PHP Class Webiny\Component\Annotations\Annotations

This component provides methods for reading annotations assigned to a class, method or property.
Inheritance: use trait Webiny\Component\StdLib\ComponentTrait
Exibir arquivo Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
getClassAnnotations ( string $class ) : ConfigObject Get all annotations for the given class.
getMethodAnnotations ( string $class, string $method ) : ConfigObject Get all annotations for the method name on the given class.
getPropertyAnnotations ( string $class, string $property ) : ConfigObject Get all annotations for the property name on the given class.

Private Methods

Method Description
explodeNamespaces ( array $annotationBag ) : array Converts the dotted annotations inside array key names into a multidimensional array.
setArrayValue ( array &$root, string $compositeKey, string $value ) Changes the dotted annotation of one key into a multidimensional array.

Method Details

getClassAnnotations() public static method

Get all annotations for the given class.
public static getClassAnnotations ( string $class ) : ConfigObject
$class string Fully qualified class name
return Webiny\Component\Config\ConfigObject ConfigObject instance containing all annotations.

getMethodAnnotations() public static method

Get all annotations for the method name on the given class.
public static getMethodAnnotations ( string $class, string $method ) : ConfigObject
$class string Fully qualified class name
$method string Method name
return Webiny\Component\Config\ConfigObject ConfigObject instance containing all annotations.

getPropertyAnnotations() public static method

Get all annotations for the property name on the given class.
public static getPropertyAnnotations ( string $class, string $property ) : ConfigObject
$class string Fully qualified class name
$property string Property name
return Webiny\Component\Config\ConfigObject ConfigObject instance containing all annotations.