PHP Class Go\Instrument\Transformer\MagicConstantTransformer

Additionally, ReflectionClass->getFileName() is also wrapped into normalizer method call
Inheritance: extends BaseSourceTransformer
Afficher le fichier Open project: goaop/framework Class Usage Examples

Protected Properties

Свойство Type Description
$rewriteToPath string Path to rewrite to (cache directory)
$rootPath string Root path of application

Méthodes publiques

Méthode Description
__construct ( AspectKernel $kernel ) Class constructor
resolveFileName ( string $fileName ) : string Resolves file name from the cache directory to the real application root dir
transform ( StreamMetaData $metadata ) : void | boolean This method may transform the supplied source and return a new replacement for it

Private Methods

Méthode Description
replaceMagicConstants ( StreamMetaData $metadata ) Replace only magic constants in the code

Method Details

__construct() public méthode

Class constructor
public __construct ( AspectKernel $kernel )
$kernel Go\Core\AspectKernel Instance of kernel

resolveFileName() public static méthode

Resolves file name from the cache directory to the real application root dir
public static resolveFileName ( string $fileName ) : string
$fileName string Absolute file name
Résultat string Resolved file name

transform() public méthode

This method may transform the supplied source and return a new replacement for it
public transform ( StreamMetaData $metadata ) : void | boolean
$metadata StreamMetaData Metadata for source
Résultat void | boolean Return false if transformation should be stopped

Property Details

$rewriteToPath protected_oe static_oe property

Path to rewrite to (cache directory)
protected static string $rewriteToPath
Résultat string

$rootPath protected_oe static_oe property

Root path of application
protected static string $rootPath
Résultat string