PHP Class Go\Instrument\Transformer\FilterInjectorTransformer

Inheritance: implements Go\Instrument\Transformer\SourceTransformer
Datei anzeigen Open project: goaop/framework Class Usage Examples

Protected Properties

Property Type Description
$cachePathManager Go\Instrument\ClassLoading\CachePathManager | null
$filterName string Name of the filter to inject
$kernel Go\Core\AspectKernel | null
$options array Kernel options

Public Methods

Method Description
__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

Protected Methods

Method Description
configure ( AspectKernel $kernel, string $filterName, CachePathManager $cacheManager ) Static configurator for filter

Method Details

__construct() public method

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() protected static method

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() public static method

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
return string Transformed path to the resource

transform() public method

Wrap all includes into rewrite filter
public transform ( StreamMetaData $metadata ) : void | boolean
$metadata StreamMetaData Metadata for source
return void | boolean Return false if transformation should be stopped

Property Details

$cachePathManager protected_oe static_oe property

protected static CachePathManager,Go\Instrument\ClassLoading|null $cachePathManager
return Go\Instrument\ClassLoading\CachePathManager | null

$filterName protected_oe static_oe property

Name of the filter to inject
protected static string $filterName
return string

$kernel protected_oe static_oe property

protected static AspectKernel,Go\Core|null $kernel
return Go\Core\AspectKernel | null

$options protected_oe static_oe property

Kernel options
protected static array $options
return array