PHP Class Go\Instrument\Transformer\FilterInjectorTransformer

Inheritance: implements Go\Instrument\Transformer\SourceTransformer
Afficher le fichier Open project: goaop/framework Class Usage Examples

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

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

Method Details

__construct() public méthode

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 méthode

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 méthode

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
Résultat string Transformed path to the resource

transform() public méthode

Wrap all includes into rewrite filter
public transform ( StreamMetaData $metadata ) : void | boolean
$metadata StreamMetaData Metadata for source
Résultat 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
Résultat Go\Instrument\ClassLoading\CachePathManager | null

$filterName protected_oe static_oe property

Name of the filter to inject
protected static string $filterName
Résultat string

$kernel protected_oe static_oe property

protected static AspectKernel,Go\Core|null $kernel
Résultat Go\Core\AspectKernel | null

$options protected_oe static_oe property

Kernel options
protected static array $options
Résultat array