PHP Класс Go\Core\AspectLoader

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$annotationReader Doctrine\Common\Annotations\Reader | null Annotation reader for aspects
$container null | Go\Core\AspectContainer Aspect container instance
$loadedAspects array List of aspects that was loaded
$loaders array List of aspect loaders

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

Метод Описание
__construct ( Go\Core\AspectContainer $container, Doctrine\Common\Annotations\Reader $reader ) Loader constructor
getUnloadedAspects ( ) : array | Go\Aop\Aspect[] Returns list of unloaded aspects in the container
load ( Go\Aop\Aspect $aspect ) : array | Go\Aop\Pointcut[] | Go\Aop\Advisor[] Loads an aspect with the help of aspect loaders, but don't register it in the container
loadAndRegister ( Go\Aop\Aspect $aspect ) Loads and register all items of aspect in the container
registerLoaderExtension ( Go\Core\AspectLoaderExtension $loader ) Register an aspect loader extension

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

Метод Описание
getAnnotations ( ReflectionClass | ReflectionMethod | ReflectionProperty $refPoint ) : array Return list of annotations for reflection point
loadFrom ( Go\Aop\Aspect $aspect, ReflectionClass | ReflectionMethod | ReflectionProperty $refPoint, array $loaders ) : array | Go\Aop\Pointcut[] | Go\Aop\Advisor[] Load definitions from specific aspect part into the aspect container

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

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

Loader constructor
public __construct ( Go\Core\AspectContainer $container, Doctrine\Common\Annotations\Reader $reader )
$container Go\Core\AspectContainer Instance of container to store pointcuts and advisors
$reader Doctrine\Common\Annotations\Reader Reader for annotations that is used for aspects

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

Return list of annotations for reflection point
protected getAnnotations ( ReflectionClass | ReflectionMethod | ReflectionProperty $refPoint ) : array
$refPoint ReflectionClass | ReflectionMethod | ReflectionProperty Reflection instance
Результат array list of annotations

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

Returns list of unloaded aspects in the container
public getUnloadedAspects ( ) : array | Go\Aop\Aspect[]
Результат array | Go\Aop\Aspect[]

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

Loads an aspect with the help of aspect loaders, but don't register it in the container
См. также: loadAndRegister() method for registration
public load ( Go\Aop\Aspect $aspect ) : array | Go\Aop\Pointcut[] | Go\Aop\Advisor[]
$aspect Go\Aop\Aspect Aspect to load
Результат array | Go\Aop\Pointcut[] | Go\Aop\Advisor[]

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

Loads and register all items of aspect in the container
public loadAndRegister ( Go\Aop\Aspect $aspect )
$aspect Go\Aop\Aspect

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

Load definitions from specific aspect part into the aspect container
protected loadFrom ( Go\Aop\Aspect $aspect, ReflectionClass | ReflectionMethod | ReflectionProperty $refPoint, array $loaders ) : array | Go\Aop\Pointcut[] | Go\Aop\Advisor[]
$aspect Go\Aop\Aspect Aspect instance
$refPoint ReflectionClass | ReflectionMethod | ReflectionProperty Reflection instance
$loaders array List of loaders that can produce advisors from aspect class
Результат array | Go\Aop\Pointcut[] | Go\Aop\Advisor[]

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

This method allows to extend the logic of aspect loading by registering an extension for loader.
public registerLoaderExtension ( Go\Core\AspectLoaderExtension $loader )
$loader Go\Core\AspectLoaderExtension Loader to register

Описание свойств

$annotationReader защищенное свойство

Annotation reader for aspects
protected Reader,Doctrine\Common\Annotations|null $annotationReader
Результат Doctrine\Common\Annotations\Reader | null

$container защищенное свойство

Aspect container instance
protected null|AspectContainer,Go\Core $container
Результат null | Go\Core\AspectContainer

$loadedAspects защищенное свойство

List of aspects that was loaded
protected array $loadedAspects
Результат array

$loaders защищенное свойство

List of aspect loaders
protected array $loaders
Результат array