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