PHP Class Kahlan\Jit\Patcher\Layer

Datei anzeigen Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Property Type Description
$_classes array Class dependencies.
$_override array The fully namespeced class names to "layerize".
$_pointcut object The pointcut patcher
$_suffix string Suffix for Layer class.

Public Methods

Method Description
__construct ( $config = [] ) The constructor.
findFile ( object $loader, string $class, string $file ) : string The JIT find file patcher.
patchable ( string $class ) : boolean The JIT patchable checker.
process ( object $node, string $path = null ) : object The JIT patcher.

Protected Methods

Method Description
_processTree ( array $parent ) Helper for Layer::process().

Method Details

__construct() public method

The constructor.
public __construct ( $config = [] )

_processTree() protected method

Helper for Layer::process().
protected _processTree ( array $parent )
$parent array The node instance tor process.

findFile() public method

The JIT find file patcher.
public findFile ( object $loader, string $class, string $file ) : string
$loader object The autloader instance.
$class string The fully-namespaced class name.
$file string The correponding finded file path.
return string The patched file path.

patchable() public method

The JIT patchable checker.
public patchable ( string $class ) : boolean
$class string The fully-namespaced class name to check.
return boolean

process() public method

The JIT patcher.
public process ( object $node, string $path = null ) : object
$node object The node instance to patch.
$path string The file path of the source code.
return object The patched node.

Property Details

$_classes protected_oe property

Class dependencies.
protected array $_classes
return array

$_override protected_oe property

The fully namespeced class names to "layerize".
protected array $_override
return array

$_pointcut protected_oe property

The pointcut patcher
protected object $_pointcut
return object

$_suffix protected_oe property

Suffix for Layer class.
protected string $_suffix
return string