PHP Class Devise\Pages\Interpreter\Modifiers\RegisterDeviseTags

Inheritance: extends PhpParser\NodeVisitorAbstract
Datei anzeigen Open project: devisephp/cms

Protected Properties

Property Type Description
$registrations array Registrations are the tags that have been registered from this node's traversal

Public Methods

Method Description
__construct ( DeviseParser $DeviseParser ) Create a new RegisterDeviseTags visitor
afterTraverse ( array $nodes ) : array Runs after all the nodes have been examined
enterNode ( PhpParser\Node $node ) : void We are examine this node for data-devise tags inside of the html. We only need to check out InlineHTML nodes

Protected Methods

Method Description
addDvsPageDataInitializeStmt ( ) [addDvsPageDataInitializeStmt description]
getAppMakeRegisterString ( DeviseTag $tag ) : string Creates a string of App::make register statements for us
getNewDeviseTagString ( DeviseTag $tag ) : string Creates a string from tag parameters which will be used to rewrite the data-devise html
parseNode ( string $html ) : string Parses the node of html for us
registerDeviseTag ( DeviseTag $tag, $html ) : string Register a devise tag, and also replaces the data-devise html with the cid stuff

Method Details

__construct() public method

Create a new RegisterDeviseTags visitor
public __construct ( DeviseParser $DeviseParser )
$DeviseParser Devise\Pages\Interpreter\DeviseParser

addDvsPageDataInitializeStmt() protected method

[addDvsPageDataInitializeStmt description]

afterTraverse() public method

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

enterNode() public method

We are examine this node for data-devise tags inside of the html. We only need to check out InlineHTML nodes
public enterNode ( PhpParser\Node $node ) : void
$node PhpParser\Node
return void

getAppMakeRegisterString() protected method

Creates a string of App::make register statements for us
protected getAppMakeRegisterString ( DeviseTag $tag ) : string
$tag Devise\Pages\Interpreter\DeviseTag
return string

getNewDeviseTagString() protected method

Creates a string from tag parameters which will be used to rewrite the data-devise html
protected getNewDeviseTagString ( DeviseTag $tag ) : string
$tag Devise\Pages\Interpreter\DeviseTag
return string

parseNode() protected method

Parses the node of html for us
protected parseNode ( string $html ) : string
$html string
return string

registerDeviseTag() protected method

Register a devise tag, and also replaces the data-devise html with the cid stuff
protected registerDeviseTag ( DeviseTag $tag, $html ) : string
$tag Devise\Pages\Interpreter\DeviseTag
return string

Property Details

$registrations protected_oe property

Registrations are the tags that have been registered from this node's traversal
protected array $registrations
return array