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
Afficher le fichier Open project: Webiny/Framework Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

getMethodAnnotations() public static méthode

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
Résultat Webiny\Component\Config\ConfigObject ConfigObject instance containing all annotations.

getPropertyAnnotations() public static méthode

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
Résultat Webiny\Component\Config\ConfigObject ConfigObject instance containing all annotations.