PHP Класс Go\Instrument\Transformer\WeavingTransformer

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

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

Свойство Тип Описание
$adviceMatcher Go\Core\AdviceMatcher
$aspectLoader Go\Core\AspectLoader Instance of aspect loader

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

Метод Описание
__construct ( AspectKernel $kernel, AdviceMatcher $adviceMatcher, CachePathManager $cachePathManager, AspectLoader $loader ) Constructs a weaving transformer
transform ( StreamMetaData $metadata ) : boolean This method may transform the supplied source and return a new replacement for it

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

Метод Описание
adjustOriginalClass ( ReflectionClas\ReflectionClass $class, string $source, string $newParentName ) : string Adjust definition of original class source to enable extending
loadAndRegisterAspects ( array $unloadedAspects ) Utility method to load and register unloaded aspects
processFunctions ( array $advisors, StreamMetaData $metadata, Go\ParserReflection\ReflectionFileNamespace $namespace ) : boolean Performs weaving of functions in the current namespace
processSingleClass ( array $advisors, StreamMetaData $metadata, ReflectionClas\ReflectionClass $class, integer &$lineOffset ) : boolean Performs weaving of single class if needed
saveProxyToCache ( ReflectionClas\ReflectionClass $class, string | ClassProxy $child ) : string Save AOP proxy to the separate file anr returns the php source code for inclusion

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

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

Constructs a weaving transformer
public __construct ( AspectKernel $kernel, AdviceMatcher $adviceMatcher, CachePathManager $cachePathManager, AspectLoader $loader )
$kernel Go\Core\AspectKernel Instance of aspect kernel
$adviceMatcher Go\Core\AdviceMatcher Advice matcher for class
$cachePathManager Go\Instrument\ClassLoading\CachePathManager Cache manager
$loader Go\Core\AspectLoader Loader for aspects

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

This method may transform the supplied source and return a new replacement for it
public transform ( StreamMetaData $metadata ) : boolean
$metadata StreamMetaData Metadata for source
Результат boolean Return false if transformation should be stopped

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

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

protected AdviceMatcher,Go\Core $adviceMatcher
Результат Go\Core\AdviceMatcher

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

Instance of aspect loader
protected AspectLoader,Go\Core $aspectLoader
Результат Go\Core\AspectLoader