Class CurlyBracketsFilter (namespace Nette\Templates)
Compile-time filter CurlyBrackets.
Object | --CurlyBracketsFilter
Public Method Summary | |
---|---|
static string |
fetchToken
(string &$s)
Reads single token (optionally delimited by comma) from string.
|
static string |
formatArray
(string $s, [string $prefix =
'' ])
Formats parameters to PHP array.
|
static string |
formatModifiers
(string $var, string $modifiers)
Applies modifiers.
|
static string |
formatString
(string $s)
Formats parameter to PHP string.
|
ICurlyBracketsHandler |
getHandler
()
Returns macro handler.
|
int |
getLine
()
Returns current line number.
|
static void |
invoke
($s)
Invokes filter.
|
void |
setHandler
(ICurlyBracketsHandler $handler)
Sets a macro handler.
|
string |
__invoke
(string $s)
Invokes filter.
|
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Constant Summary | |||
---|---|---|---|
string | CONTEXT_ATTRIBUTE |
'attribute' |
line 75 Context-aware escaping states |
string | CONTEXT_CDATA |
'cdata' |
line 73 Context-aware escaping states |
string | CONTEXT_COMMENT |
'comment' |
line 77 Context-aware escaping states |
string | CONTEXT_NONE |
'none' |
line 76 Context-aware escaping states |
string | CONTEXT_TAG |
'tag' |
line 74 Context-aware escaping states |
string | CONTEXT_TEXT |
'text' |
line 72 Context-aware escaping states |
string | HTML_PREFIX |
'n:' |
line 51 spcial HTML tag or attribute prefix |
string | RE_CURLY |
'
(?P<indent>\n[ \t]*)?
\\{(?P<macro>[^\\s\'"{}](?>... |
line 42 curly bracket tag |
string | RE_IDENTIFIER |
'[_a-zA-Z\x7F-\xFF][_a-zA-Z0-9\x7F-\xFF]*' |
line 39 PHP identifier |
string | RE_STRING |
'\'(?:\\\\.|[^\'\\\\])*\'|"(?:\\\\.|[^"\\\\])*"' |
line 36 single & double quoted PHP string |
Variable Summary | ||||
---|---|---|---|---|
string | $context |
|
line 69 |
|
mixed | $escape |
|
line 69 |
Method Details | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 461 fetchTokenpublic static string fetchToken (string &$s) Reads single token (optionally delimited by comma) from string.
|
||||||||||||||||||
line 478 formatArraypublic static string formatArray (string $s, [string $prefix = Formats parameters to PHP array.
|
||||||||||||||||||
line 412 formatModifierspublic static string formatModifiers (string $var, string $modifiers) Applies modifiers.
|
||||||||||||||||||
line 517 formatStringpublic static string formatString (string $s) Formats parameter to PHP string.
|
||||||||||||||||||
line 98 getHandlerpublic ICurlyBracketsHandler getHandler () Returns macro handler.
|
||||||||||||||||||
line 395 getLinepublic int getLine () Returns current line number.
|
||||||||||||||||||
line 528 invokepublic static void invoke ($s) Invokes filter.
|
||||||||||||||||||
line 87 setHandlerpublic void setHandler (ICurlyBracketsHandler $handler) Sets a macro handler.
|
||||||||||||||||||
line 113 __invokepublic string __invoke (string $s) Invokes filter.
|