PHP Class Go\Instrument\Transformer\MagicConstantTransformer

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

Protected Properties

Property Type Description
$rewriteToPath string Path to rewrite to (cache directory)
$rootPath string Root path of application

Public Methods

Method 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

Method Description
replaceMagicConstants ( StreamMetaData $metadata ) Replace only magic constants in the code

Method Details

__construct() public method

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

resolveFileName() public static method

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

transform() public method

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
return 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
return string

$rootPath protected_oe static_oe property

Root path of application
protected static string $rootPath
return string