AsseticTokenParser
extends Twig_TokenParser
in package
Base class for all token parsers.
Table of Contents
- $parser : Parser
- $extensions : mixed
- $factory : mixed
- $output : mixed
- $single : mixed
- $tag : mixed
- __construct() : mixed
- Constructor.
- getTag() : mixed
- parse() : mixed
- setParser() : mixed
- Sets the parser associated with this token parser.
- testEndTag() : mixed
- createBodyNode() : Twig_Node
- createNode() : Twig_Node
Properties
$parser
protected
Parser
$parser
$extensions
private
mixed
$extensions
$factory
private
mixed
$factory
$output
private
mixed
$output
$single
private
mixed
$single
$tag
private
mixed
$tag
Methods
__construct()
Constructor.
public
__construct(AssetFactory $factory, string $tag, string $output[, bool $single = false ][, array<string|int, mixed> $extensions = array() ]) : mixed
Attributes can be added to the tag by passing names as the options array. These values, if found, will be passed to the factory and node.
Parameters
- $factory : AssetFactory
-
The asset factory
- $tag : string
-
The tag name
- $output : string
-
The default output string
- $single : bool = false
-
Whether to force a single asset
- $extensions : array<string|int, mixed> = array()
-
Additional attribute names to look for
Return values
mixed —getTag()
public
getTag() : mixed
Return values
mixed —parse()
public
parse(Twig_Token $token) : mixed
Parameters
- $token : Twig_Token
Return values
mixed —setParser()
Sets the parser associated with this token parser.
public
setParser(Parser $parser) : mixed
Parameters
- $parser : Parser
Return values
mixed —testEndTag()
public
testEndTag(Twig_Token $token) : mixed
Parameters
- $token : Twig_Token
Return values
mixed —createBodyNode()
protected
createBodyNode(AssetInterface $asset, Twig_Node $body, array<string|int, mixed> $inputs, array<string|int, mixed> $filters, string $name[, array<string|int, mixed> $attributes = array() ], int $lineno[, string $tag = null ]) : Twig_Node
Parameters
- $asset : AssetInterface
- $body : Twig_Node
- $inputs : array<string|int, mixed>
- $filters : array<string|int, mixed>
- $name : string
- $attributes : array<string|int, mixed> = array()
- $lineno : int
- $tag : string = null
Return values
Twig_Node —createNode()
protected
createNode(AssetInterface $asset, Twig_NodeInterface $body, array<string|int, mixed> $inputs, array<string|int, mixed> $filters, string $name[, array<string|int, mixed> $attributes = array() ], int $lineno[, string $tag = null ]) : Twig_Node
Parameters
- $asset : AssetInterface
- $body : Twig_NodeInterface
- $inputs : array<string|int, mixed>
- $filters : array<string|int, mixed>
- $name : string
- $attributes : array<string|int, mixed> = array()
- $lineno : int
- $tag : string = null