PHP Class Kahlan\Jit\Node\NodeDef

Show file Open project: crysalead/kahlan

Public Properties

Property Type Description
$body string The textual body of the node.
$close string The textual closing body of the node (used for function).
$coverable boolean Boolean indicating if code coverage is pertinant on this node.
$function instance | null The node's parent function.
$hasMethods boolean Boolean indicating this node is a trait, class or interface.
$inPhp boolean Boolean indicating if it's a PHP or plain text HTML node.
$lines array Some meta data about the node.
$namespace instance | null The node's namespace.
$parent instance | null The node's parent.
$processable boolean Use case: when multiple patchers are patching the same code. It's sometimes usefull to mark a node as "unprocessable" and let patchers know that this is not "original code" but already some added patched code.
$tree array The children of the node.
$type string The node's type.

Public Methods

Method Description
__construct ( string $body = '', string $type = null ) The constructor.
__toString ( ) : string Returns the textual representation of the node.

Method Details

__construct() public method

The constructor.
public __construct ( string $body = '', string $type = null )
$body string The textual body of the node.
$type string The type of the node.

__toString() public method

Returns the textual representation of the node.
public __toString ( ) : string
return string

Property Details

$body public property

The textual body of the node.
public string $body
return string

$close public property

The textual closing body of the node (used for function).
public string $close
return string

$coverable public property

Boolean indicating if code coverage is pertinant on this node.
public bool $coverable
return boolean

$function public property

The node's parent function.
public instance|null $function
return instance | null

$hasMethods public property

Boolean indicating this node is a trait, class or interface.
public bool $hasMethods
return boolean

$inPhp public property

Boolean indicating if it's a PHP or plain text HTML node.
public bool $inPhp
return boolean

$lines public property

Some meta data about the node.
public array $lines
return array

$namespace public property

The node's namespace.
public instance|null $namespace
return instance | null

$parent public property

The node's parent.
public instance|null $parent
return instance | null

$processable public property

Use case: when multiple patchers are patching the same code. It's sometimes usefull to mark a node as "unprocessable" and let patchers know that this is not "original code" but already some added patched code.
public bool $processable
return boolean

$tree public property

The children of the node.
public array $tree
return array

$type public property

The node's type.
public string $type
return string