PHP Class Devise\Pages\Interpreter\Modifiers\AddPlaceHolderTags

Inheritance: extends PhpParser\NodeVisitorAbstract
Exibir arquivo Open project: devisephp/cms

Public Methods

Method Description
__construct ( DeviseParser $DeviseParser ) [__construct description]
afterTraverse ( array $nodes ) : array Runs after all the nodes have been examined

Protected Methods

Method Description
createPlaceHolderNodeFromTags ( array $tags ) : PhpParser\Node\Stmt\InlineHTML Create the placeholder nodes from the listed tags
findTagsInsideOfCondition ( PhpParser\Node\Stmt\If_ $node ) : array Gets a list of tags inside of a condition
findTagsInsideOfLoop ( $node ) : array Returns a list of tags inside of loop
findTagsInsideOfNode ( PhpParser\Node $node ) : array Gets a list of tags inside of a node
findTagsInsideOfStmts ( array $stmts ) : array Finds all the tags inside of stmts and also recursively modifies the AST putting placeholder tags all the way down in the tree (for nested loops and conditions)

Method Details

__construct() public method

[__construct description]
public __construct ( DeviseParser $DeviseParser )
$DeviseParser Devise\Pages\Interpreter\DeviseParser

afterTraverse() public method

Runs after all the nodes have been examined
public afterTraverse ( array $nodes ) : array
$nodes array
return array

createPlaceHolderNodeFromTags() protected method

Create the placeholder nodes from the listed tags
protected createPlaceHolderNodeFromTags ( array $tags ) : PhpParser\Node\Stmt\InlineHTML
$tags array
return PhpParser\Node\Stmt\InlineHTML

findTagsInsideOfCondition() protected method

Gets a list of tags inside of a condition
protected findTagsInsideOfCondition ( PhpParser\Node\Stmt\If_ $node ) : array
$node PhpParser\Node\Stmt\If_
return array

findTagsInsideOfLoop() protected method

Returns a list of tags inside of loop
protected findTagsInsideOfLoop ( $node ) : array
return array

findTagsInsideOfNode() protected method

Gets a list of tags inside of a node
protected findTagsInsideOfNode ( PhpParser\Node $node ) : array
$node PhpParser\Node
return array

findTagsInsideOfStmts() protected method

Finds all the tags inside of stmts and also recursively modifies the AST putting placeholder tags all the way down in the tree (for nested loops and conditions)
protected findTagsInsideOfStmts ( array $stmts ) : array
$stmts array
return array