PHP Class Go\Instrument\Transformer\ConstructorExecutionTransformer

See also: https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y new_expr: T_NEW class_name_reference ctor_arguments class_name_reference: class_name | new_variable class_name: T_STATIC | name namespace_name: T_STRING | namespace_name T_NS_SEPARATOR T_STRING name: namespace_name | T_NAMESPACE T_NS_SEPARATOR namespace_name | T_NS_SEPARATOR namespace_name ctor_arguments: / empty / | argument_list
Inheritance: implements Go\Instrument\Transformer\SourceTransformer
Datei anzeigen Open project: goaop/framework

Public Methods

Method Description
__call ( string $className, array $args ) : object Magic interceptor for instance creation
__get ( string $className ) : object Magic interceptor for instance creation
getInstance ( ) : static Singletone
transform ( StreamMetaData $metadata = null ) : void | boolean Rewrites all "new" expressions with our implementation

Protected Methods

Method Description
construct ( string $fullClassName, array $arguments = [] ) : object Default implementation for accessing joinpoint or creating a new one on-fly

Method Details

__call() public method

Magic interceptor for instance creation
public __call ( string $className, array $args ) : object
$className string Name of the class to construct
$args array Arguments for the constructor
return object Instance of required object

__get() public method

Magic interceptor for instance creation
public __get ( string $className ) : object
$className string Name of the class to construct
return object Instance of required object

construct() protected static method

Default implementation for accessing joinpoint or creating a new one on-fly
protected static construct ( string $fullClassName, array $arguments = [] ) : object
$fullClassName string Name of the class to create
$arguments array Arguments for constructor
return object

getInstance() public static method

Singletone
public static getInstance ( ) : static
return static

transform() public method

Rewrites all "new" expressions with our implementation
public transform ( StreamMetaData $metadata = null ) : void | boolean
$metadata StreamMetaData Metadata for source
return void | boolean Return false if transformation should be stopped