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

Наследование: implements Go\Instrument\Transformer\SourceTransformer
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$cachePathManager Go\Instrument\ClassLoading\CachePathManager | null
$filterName string Name of the filter to inject
$kernel Go\Core\AspectKernel | null
$options array Kernel options

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

Метод Описание
__construct ( AspectKernel $kernel, string $filterName, CachePathManager $cacheManager ) Class constructor
rewrite ( string $originalResource, string $originalDir = '' ) : string Replace source path with correct one
transform ( StreamMetaData $metadata ) : void | boolean Wrap all includes into rewrite filter

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

Метод Описание
configure ( AspectKernel $kernel, string $filterName, CachePathManager $cacheManager ) Static configurator for filter

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

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

Class constructor
public __construct ( AspectKernel $kernel, string $filterName, CachePathManager $cacheManager )
$kernel Go\Core\AspectKernel Kernel to take configuration from
$filterName string Name of the filter to inject
$cacheManager Go\Instrument\ClassLoading\CachePathManager Manager for cache files

configure() защищенный статический Метод

Static configurator for filter
protected static configure ( AspectKernel $kernel, string $filterName, CachePathManager $cacheManager )
$kernel Go\Core\AspectKernel Kernel to use for configuration
$filterName string Name of the filter to inject
$cacheManager Go\Instrument\ClassLoading\CachePathManager Cache manager

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

This operation can check for cache, can rewrite paths, add additional filters and much more
public static rewrite ( string $originalResource, string $originalDir = '' ) : string
$originalResource string Initial resource to include
$originalDir string Path to the directory from where include was called for resolving relative resources
Результат string Transformed path to the resource

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

Wrap all includes into rewrite filter
public transform ( StreamMetaData $metadata ) : void | boolean
$metadata StreamMetaData Metadata for source
Результат void | boolean Return false if transformation should be stopped

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

$cachePathManager защищенное статическое свойство

protected static CachePathManager,Go\Instrument\ClassLoading|null $cachePathManager
Результат Go\Instrument\ClassLoading\CachePathManager | null

$filterName защищенное статическое свойство

Name of the filter to inject
protected static string $filterName
Результат string

$kernel защищенное статическое свойство

protected static AspectKernel,Go\Core|null $kernel
Результат Go\Core\AspectKernel | null

$options защищенное статическое свойство

Kernel options
protected static array $options
Результат array