PHP Class Go\Instrument\ClassLoading\SourceTransformingLoader

Inheritance: extends php_user_filter
Datei anzeigen Open project: goaop/framework Class Usage Examples

Protected Properties

Property Type Description
$data string String buffer
$filterId string Identifier of filter
$transformers array | Go\Instrument\Transformer\SourceTransformer[] List of transformers

Public Methods

Method Description
addTransformer ( Go\Instrument\Transformer\SourceTransformer $transformer ) : void Adds a SourceTransformer to be applied by this LoadTimeWeaver.
filter ( $in, $out, &$consumed, $closing )
getId ( ) : string Returns the name of registered filter
register ( string $filterId = self::FILTER_IDENTIFIER ) Register current loader as stream filter in PHP
transformCode ( StreamMetaData $metadata ) : void | boolean Transforms source code by passing it through all transformers

Method Details

addTransformer() public static method

Adds a SourceTransformer to be applied by this LoadTimeWeaver.
public static addTransformer ( Go\Instrument\Transformer\SourceTransformer $transformer ) : void
$transformer Go\Instrument\Transformer\SourceTransformer SourceTransformer Transformer for source code
return void

filter() public method

public filter ( $in, $out, &$consumed, $closing )

getId() public static method

Returns the name of registered filter
public static getId ( ) : string
return string

register() public static method

Register current loader as stream filter in PHP
public static register ( string $filterId = self::FILTER_IDENTIFIER )
$filterId string Identifier for the filter

transformCode() public static method

Transforms source code by passing it through all transformers
public static transformCode ( StreamMetaData $metadata ) : void | boolean
$metadata Go\Instrument\Transformer\StreamMetaData Metadata from stream
return void | boolean Return false if transformation should be stopped

Property Details

$data protected_oe property

String buffer
protected string $data
return string

$filterId protected_oe static_oe property

Identifier of filter
protected static string $filterId
return string

$transformers protected_oe static_oe property

List of transformers
protected static array|SourceTransformer[],Go\Instrument\Transformer $transformers
return array | Go\Instrument\Transformer\SourceTransformer[]