PHP 클래스 Kahlan\Jit\Patcher\Monkey

파일 보기 프로젝트 열기: crysalead/kahlan 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_blacklist array Ignoring the following statements which are not valid function or class names.
$_counter integer Counter for building unique variable name.
$_depth integer Nested function depth level.
$_prefix string Prefix to use for custom variable name.
$_regex string The regex.
$_uses array Uses for the parsed node's namespace.
$_variables array Variables for the parsed node.

공개 메소드들

메소드 설명
__construct ( $config = [] ) The constructor.
blacklisted ( string $name = null ) : boolean Check if a function is part of the blacklisted ones.
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.

보호된 메소드들

메소드 설명
_addClosingParenthesis ( $pos, integer $index, array $parent ) : boolean Add a closing parenthesis
_flushVariables ( array $node ) Flush stored variables in the passed node.
_monkeyPatch ( object $node, array $parent, integer $index ) Monkey patch a node body.
_processTree ( $parent ) Helper for Monkey::process().

메소드 상세

__construct() 공개 메소드

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

_addClosingParenthesis() 보호된 메소드

Add a closing parenthesis
protected _addClosingParenthesis ( $pos, integer $index, array $parent ) : boolean
$index integer The index of node in parent children.
$parent array The parent array.
리턴 boolean Returns `true` if succeed, `false` otherwise.

_flushVariables() 보호된 메소드

Flush stored variables in the passed node.
protected _flushVariables ( array $node )
$node array The node to store variables in.

_monkeyPatch() 보호된 메소드

Monkey patch a node body.
protected _monkeyPatch ( object $node, array $parent, integer $index )
$node object The node to monkey patch.
$parent array The parent array.
$index integer The index of node in parent children.

_processTree() 보호된 메소드

Helper for Monkey::process().
protected _processTree ( $parent )

blacklisted() 공개 정적인 메소드

Check if a function is part of the blacklisted ones.
public static blacklisted ( string $name = null ) : boolean
$name string A function name.
리턴 boolean

findFile() 공개 메소드

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.
리턴 string The patched file path.

patchable() 공개 메소드

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

process() 공개 메소드

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.
리턴 object The patched node.

프로퍼티 상세

$_blacklist 보호되어 있는 정적으로 프로퍼티

Ignoring the following statements which are not valid function or class names.
protected static array $_blacklist
리턴 array

$_counter 보호되어 있는 프로퍼티

Counter for building unique variable name.
protected int $_counter
리턴 integer

$_depth 보호되어 있는 프로퍼티

Nested function depth level.
protected int $_depth
리턴 integer

$_prefix 보호되어 있는 프로퍼티

Prefix to use for custom variable name.
protected string $_prefix
리턴 string

$_regex 보호되어 있는 프로퍼티

The regex.
protected string $_regex
리턴 string

$_uses 보호되어 있는 프로퍼티

Uses for the parsed node's namespace.
protected array $_uses
리턴 array

$_variables 보호되어 있는 프로퍼티

Variables for the parsed node.
protected array $_variables
리턴 array