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

Additionally, ReflectionClass->getFileName() is also wrapped into normalizer method call
Наследование: extends BaseSourceTransformer
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$rewriteToPath string Path to rewrite to (cache directory)
$rootPath string Root path of application

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

Метод Описание
__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

Приватные методы

Метод Описание
replaceMagicConstants ( StreamMetaData $metadata ) Replace only magic constants in the code

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

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

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

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

Resolves file name from the cache directory to the real application root dir
public static resolveFileName ( string $fileName ) : string
$fileName string Absolute file name
Результат string Resolved file name

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

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
Результат void | boolean Return false if transformation should be stopped

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

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

Path to rewrite to (cache directory)
protected static string $rewriteToPath
Результат string

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

Root path of application
protected static string $rootPath
Результат string