PHP Класс Prado\TComponentReflection

TComponentReflection provides functionalities to inspect the public/protected properties, events and methods defined in a class. The following code displays the properties and events defined in {@link TDataGrid}, $reflection=new TComponentReflection('TDataGrid'); Prado::varDump($reflection->getProperties()); Prado::varDump($reflection->getEvents());
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TComponent
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( $component ) Constructor.
getClassName ( ) : string
getEvents ( ) : array
getMethods ( ) : array
getProperties ( ) : array

Защищенные методы

Метод Описание
determinePropertyType ( $method ) : string Determines the property type.

Приватные методы

Метод Описание
isEventMethod ( $method )
isPropertyMethod ( $method )
reflect ( )

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( $component )

determinePropertyType() защищенный Метод

This method uses the doc comment to determine the property type.
protected determinePropertyType ( $method ) : string
Результат string the property type, '{unknown}' if type cannot be determined from comment

getClassName() публичный Метод

public getClassName ( ) : string
Результат string class name of the component

getEvents() публичный Метод

public getEvents ( ) : array
Результат array list of component events. Array keys are event names. Each array element is of the following structure: [protected]=>whether the event is protected or not [class]=>the class where the event is inherited from. [comments]=>comments associated with the event.

getMethods() публичный Метод

public getMethods ( ) : array
Результат array list of public/protected methods. Array keys are method names. Each array element is of the following structure: [protected]=>whether the method is protected or not [static]=>whether the method is static or not [class]=>the class where the property is inherited from, [comments]=>comments associated with the event.

getProperties() публичный Метод

public getProperties ( ) : array
Результат array list of component properties. Array keys are property names. Each array element is of the following structure: [type]=>property type, [readonly]=>whether the property is read-only, [protected]=>whether the method is protected or not [class]=>the class where the property is inherited from, [comments]=>comments associated with the property.