PHP Class Kahlan\Jit\Patchers

Afficher le fichier Open project: crysalead/kahlan

Protected Properties

Свойство Type Description
$_patchers The registered patchers.

Méthodes publiques

Méthode Description
add ( string $name, object $patcher ) : object | boolean Adds a patcher.
clear ( ) Removes all patchers.
exists ( string $name ) : boolean Checks if a patcher exist.
findFile ( $loader, $class, $file ) Runs file loader patchers.
get ( $name ) : object | boolean Gets a patcher.
patchable ( string $class ) : boolean Checks whether a class need to be patched or not.
process ( string $code, string $path = null ) : string Runs file patchers.
remove ( string $name ) Removes a patcher.

Method Details

add() public méthode

Adds a patcher.
public add ( string $name, object $patcher ) : object | boolean
$name string The patcher name.
$patcher object A patcher.
Résultat object | boolean The added patcher instance or `false` on failure.

clear() public méthode

Removes all patchers.
public clear ( )

exists() public méthode

Checks if a patcher exist.
public exists ( string $name ) : boolean
$name string The patcher name.
Résultat boolean

findFile() public méthode

Runs file loader patchers.
public findFile ( $loader, $class, $file )

get() public méthode

Gets a patcher.
public get ( $name ) : object | boolean
Résultat object | boolean The patcher instance or `false` if not founded.

patchable() public méthode

Checks whether a class need to be patched or not.
public patchable ( string $class ) : boolean
$class string The class to check.
Résultat boolean

process() public méthode

Runs file patchers.
public process ( string $code, string $path = null ) : string
$code string The source code to process.
$path string The file path of the source code.
Résultat string The patched source code.

remove() public méthode

Removes a patcher.
public remove ( string $name )
$name string The patcher name.

Property Details

$_patchers protected_oe property

The registered patchers.
protected $_patchers