PHP Класс Webiny\Component\Annotations\Annotations

This component provides methods for reading annotations assigned to a class, method or property.
Наследование: use trait Webiny\Component\StdLib\ComponentTrait
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

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

Метод Описание
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.

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

getClassAnnotations() публичный статический Метод

Get all annotations for the given class.
public static getClassAnnotations ( string $class ) : ConfigObject
$class string Fully qualified class name
Результат Webiny\Component\Config\ConfigObject ConfigObject instance containing all annotations.

getMethodAnnotations() публичный статический Метод

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
Результат Webiny\Component\Config\ConfigObject ConfigObject instance containing all annotations.

getPropertyAnnotations() публичный статический Метод

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
Результат Webiny\Component\Config\ConfigObject ConfigObject instance containing all annotations.