Template
class Template
Properties
protected TemplateInspector | $inspector | ||
protected bool | $isNormalized | ||
protected string | $template |
Methods
Constructor
Handle calls to undefined methods
Return this template's content
Return the content of this template as a DOMDocument
Return all the nodes in this template whose content type is CSS
Return an instance of TemplateInspector based on this template's content
Return all the nodes in this template whose content type is JavaScript
Return all the nodes in this template whose value is an URL
Return a list of parameters in use in this template
Set and/or return whether this template has been normalized
Replace parts of this template that match given regexp
Replace this template's content
Details
at line 39
__construct(string $template)
Constructor
at line 51
mixed
__call($methodName, $args)
Handle calls to undefined methods
Forwards calls to this template's TemplateInspector instance
at line 61
string
__toString()
Return this template's content
at line 73
DOMDocument
asDOM()
Return the content of this template as a DOMDocument
NOTE: the content is wrapped in an
at line 90
array
getCSSNodes()
Return all the nodes in this template whose content type is CSS
at line 100
TemplateInspector
getInspector()
Return an instance of TemplateInspector based on this template's content
at line 115
array
getJSNodes()
Return all the nodes in this template whose content type is JavaScript
at line 125
array
getURLNodes()
Return all the nodes in this template whose value is an URL
at line 135
array
getParameters()
Return a list of parameters in use in this template
at line 146
bool
isNormalized(bool $bool = null)
Set and/or return whether this template has been normalized
at line 162
void
normalize(TemplateNormalizer $templateNormalizer)
Normalize this template's content
at line 176
void
replaceTokens(string $regexp, callable $fn)
Replace parts of this template that match given regexp
at line 189
void
setContent(string $template)
Replace this template's content