|
ReflectionClassConstant::getAttributesGets Attributes Description
public array ReflectionClassConstant::getAttributes(stringnull
$name = null , int $flags = 0)Returns all attributes declared on this class constant as an array of ReflectionAttribute. Parameters
Return ValuesArray of attributes, as a ReflectionAttribute object. Examples
Example #1 Basic usage
The above example will output: Array ( [0] => Fruit [1] => Red )
Example #2 Filtering results by class name
The above example will output: Array ( [0] => Fruit )
Example #3 Filtering results by class name, with inheritance
The above example will output: Array ( [0] => Red ) See Also
|