PEEL Shopping
Open source ecommerce : PEEL Shopping
|
Stores the Twig configuration. More...
Public Member Functions | |
__construct (Twig_LoaderInterface $loader=null, $options=array()) | |
Constructor. More... | |
getBaseTemplateClass () | |
Gets the base template class for compiled templates. More... | |
setBaseTemplateClass ($class) | |
Sets the base template class for compiled templates. More... | |
enableDebug () | |
Enables debugging mode. More... | |
disableDebug () | |
Disables debugging mode. More... | |
isDebug () | |
Checks if debug mode is enabled. More... | |
enableAutoReload () | |
Enables the auto_reload option. More... | |
disableAutoReload () | |
Disables the auto_reload option. More... | |
isAutoReload () | |
Checks if the auto_reload option is enabled. More... | |
enableStrictVariables () | |
Enables the strict_variables option. More... | |
disableStrictVariables () | |
Disables the strict_variables option. More... | |
isStrictVariables () | |
Checks if the strict_variables option is enabled. More... | |
getCache () | |
Gets the cache directory or false if cache is disabled. More... | |
setCache ($cache) | |
Sets the cache directory or false if cache is disabled. More... | |
getCacheFilename ($name) | |
Gets the cache filename for a given template. More... | |
getTemplateClass ($name, $index=null) | |
Gets the template class associated with the given string. More... | |
getTemplateClassPrefix () | |
Gets the template class prefix. More... | |
render ($name, array $context=array()) | |
Renders a template. More... | |
display ($name, array $context=array()) | |
Displays a template. More... | |
loadTemplate ($name, $index=null) | |
Loads a template by name. More... | |
isTemplateFresh ($name, $time) | |
Returns true if the template is still fresh. More... | |
resolveTemplate ($names) | |
clearTemplateCache () | |
Clears the internal template cache. More... | |
clearCacheFiles () | |
Clears the template cache files on the filesystem. More... | |
getLexer () | |
Gets the Lexer instance. More... | |
setLexer (Twig_LexerInterface $lexer) | |
Sets the Lexer instance. More... | |
tokenize ($source, $name=null) | |
Tokenizes a source code. More... | |
getParser () | |
Gets the Parser instance. More... | |
setParser (Twig_ParserInterface $parser) | |
Sets the Parser instance. More... | |
parse (Twig_TokenStream $tokens) | |
Parses a token stream. More... | |
getCompiler () | |
Gets the Compiler instance. More... | |
setCompiler (Twig_CompilerInterface $compiler) | |
Sets the Compiler instance. More... | |
compile (Twig_NodeInterface $node) | |
Compiles a Node. More... | |
compileSource ($source, $name=null) | |
Compiles a template source code. More... | |
setLoader (Twig_LoaderInterface $loader) | |
Sets the Loader instance. More... | |
getLoader () | |
Gets the Loader instance. More... | |
setCharset ($charset) | |
Sets the default template charset. More... | |
getCharset () | |
Gets the default template charset. More... | |
initRuntime () | |
Initializes the runtime environment. More... | |
hasExtension ($name) | |
Returns true if the given extension is registered. More... | |
getExtension ($name) | |
Gets an extension by name. More... | |
addExtension (Twig_ExtensionInterface $extension) | |
Registers an extension. More... | |
removeExtension ($name) | |
Removes an extension by name. More... | |
setExtensions (array $extensions) | |
Registers an array of extensions. More... | |
getExtensions () | |
Returns all registered extensions. More... | |
addTokenParser (Twig_TokenParserInterface $parser) | |
Registers a Token Parser. More... | |
getTokenParsers () | |
Gets the registered Token Parsers. More... | |
getTags () | |
Gets registered tags. More... | |
addNodeVisitor (Twig_NodeVisitorInterface $visitor) | |
Registers a Node Visitor. More... | |
getNodeVisitors () | |
Gets the registered Node Visitors. More... | |
addFilter ($name, $filter=null) | |
Registers a Filter. More... | |
getFilter ($name) | |
Get a filter by name. More... | |
registerUndefinedFilterCallback ($callable) | |
getFilters () | |
Gets the registered Filters. More... | |
addTest ($name, $test=null) | |
Registers a Test. More... | |
getTests () | |
Gets the registered Tests. More... | |
getTest ($name) | |
Gets a test by name. More... | |
addFunction ($name, $function=null) | |
Registers a Function. More... | |
getFunction ($name) | |
Get a function by name. More... | |
registerUndefinedFunctionCallback ($callable) | |
getFunctions () | |
Gets registered functions. More... | |
addGlobal ($name, $value) | |
Registers a Global. More... | |
getGlobals () | |
Gets the registered Globals. More... | |
mergeGlobals (array $context) | |
Merges a context with the defined globals. More... | |
getUnaryOperators () | |
Gets the registered unary Operators. More... | |
getBinaryOperators () | |
Gets the registered binary Operators. More... | |
computeAlternatives ($name, $items) | |
Data Fields | |
const | VERSION = '1.13.2' |
Protected Member Functions | |
initGlobals () | |
initExtensions () | |
initExtension (Twig_ExtensionInterface $extension) | |
writeCacheFile ($file, $content) | |
Stores the Twig configuration.
Definition at line 17 of file Environment.php.
__construct | ( | Twig_LoaderInterface | $loader = null , |
$options = array() |
|||
) |
Constructor.
Available options:
Twig_LoaderInterface | $loader | A Twig_LoaderInterface instance |
array | $options | An array of options |
Definition at line 84 of file Environment.php.
addExtension | ( | Twig_ExtensionInterface | $extension | ) |
Registers an extension.
Twig_ExtensionInterface | $extension | A Twig_ExtensionInterface instance |
Definition at line 627 of file Environment.php.
addFilter | ( | $name, | |
$filter = null |
|||
) |
Registers a Filter.
string | Twig_SimpleFilter | $name | The filter name or a Twig_SimpleFilter instance |
Twig_FilterInterface | Twig_SimpleFilter | $filter | A Twig_FilterInterface instance or a Twig_SimpleFilter instance |
Definition at line 757 of file Environment.php.
addFunction | ( | $name, | |
$function = null |
|||
) |
Registers a Function.
string | Twig_SimpleFunction | $name | The function name or a Twig_SimpleFunction instance |
Twig_FunctionInterface | Twig_SimpleFunction | $function | A Twig_FunctionInterface instance or a Twig_SimpleFunction instance |
Definition at line 904 of file Environment.php.
addGlobal | ( | $name, | |
$value | |||
) |
Registers a Global.
New globals can be added before compiling or rendering a template; but after, you can only update existing globals.
string | $name | The global name |
mixed | $value | The global value |
Definition at line 996 of file Environment.php.
addNodeVisitor | ( | Twig_NodeVisitorInterface | $visitor | ) |
Registers a Node Visitor.
Twig_NodeVisitorInterface | $visitor | A Twig_NodeVisitorInterface instance |
Definition at line 728 of file Environment.php.
addTest | ( | $name, | |
$test = null |
|||
) |
Registers a Test.
string | Twig_SimpleTest | $name | The test name or a Twig_SimpleTest instance |
Twig_TestInterface | Twig_SimpleTest | $test | A Twig_TestInterface instance or a Twig_SimpleTest instance |
Definition at line 846 of file Environment.php.
addTokenParser | ( | Twig_TokenParserInterface | $parser | ) |
Registers a Token Parser.
Twig_TokenParserInterface | $parser | A Twig_TokenParserInterface instance |
Definition at line 681 of file Environment.php.
clearCacheFiles | ( | ) |
Clears the template cache files on the filesystem.
Definition at line 396 of file Environment.php.
clearTemplateCache | ( | ) |
Clears the internal template cache.
Definition at line 388 of file Environment.php.
compile | ( | Twig_NodeInterface | $node | ) |
Compiles a Node.
Twig_NodeInterface | $node | A Twig_NodeInterface instance |
Definition at line 513 of file Environment.php.
compileSource | ( | $source, | |
$name = null |
|||
) |
Compiles a template source code.
string | $source | The template source code |
string | $name | The template name |
Definition at line 526 of file Environment.php.
computeAlternatives | ( | $name, | |
$items | |||
) |
Definition at line 1084 of file Environment.php.
disableAutoReload | ( | ) |
Disables the auto_reload option.
Definition at line 175 of file Environment.php.
disableDebug | ( | ) |
Disables debugging mode.
Definition at line 149 of file Environment.php.
disableStrictVariables | ( | ) |
Disables the strict_variables option.
Definition at line 201 of file Environment.php.
display | ( | $name, | |
array | $context = array() |
||
) |
Displays a template.
string | $name | The template name |
array | $context | An array of parameters to pass to the template |
Definition at line 297 of file Environment.php.
enableAutoReload | ( | ) |
Enables the auto_reload option.
Definition at line 167 of file Environment.php.
enableDebug | ( | ) |
Enables debugging mode.
Definition at line 141 of file Environment.php.
enableStrictVariables | ( | ) |
Enables the strict_variables option.
Definition at line 193 of file Environment.php.
getBaseTemplateClass | ( | ) |
Gets the base template class for compiled templates.
Definition at line 123 of file Environment.php.
getBinaryOperators | ( | ) |
Gets the registered binary Operators.
Definition at line 1075 of file Environment.php.
getCache | ( | ) |
Gets the cache directory or false if cache is disabled.
Definition at line 221 of file Environment.php.
getCacheFilename | ( | $name | ) |
Gets the cache filename for a given template.
string | $name | The template name |
Definition at line 244 of file Environment.php.
getCharset | ( | ) |
Gets the default template charset.
Definition at line 577 of file Environment.php.
getCompiler | ( | ) |
Gets the Compiler instance.
Definition at line 487 of file Environment.php.
getExtension | ( | $name | ) |
Gets an extension by name.
string | $name | The extension name |
Definition at line 613 of file Environment.php.
getExtensions | ( | ) |
Returns all registered extensions.
Definition at line 671 of file Environment.php.
getFilter | ( | $name | ) |
Get a filter by name.
Subclasses may override this method and load filters differently; so no list of filters is available.
string | $name | The filter name |
Definition at line 785 of file Environment.php.
getFilters | ( | ) |
Gets the registered Filters.
Be warned that this method cannot return filters defined with registerUndefinedFunctionCallback.
Definition at line 831 of file Environment.php.
getFunction | ( | $name | ) |
Get a function by name.
Subclasses may override this method and load functions differently; so no list of functions is available.
string | $name | function name |
Definition at line 932 of file Environment.php.
getFunctions | ( | ) |
Gets registered functions.
Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback.
Definition at line 978 of file Environment.php.
getGlobals | ( | ) |
Gets the registered Globals.
Definition at line 1023 of file Environment.php.
getLexer | ( | ) |
Gets the Lexer instance.
Definition at line 414 of file Environment.php.
getLoader | ( | ) |
Gets the Loader instance.
Definition at line 553 of file Environment.php.
getNodeVisitors | ( | ) |
Gets the registered Node Visitors.
Definition at line 742 of file Environment.php.
getParser | ( | ) |
Gets the Parser instance.
Definition at line 451 of file Environment.php.
getTags | ( | ) |
Gets registered tags.
Be warned that this method cannot return tags defined by Twig_TokenParserBrokerInterface classes.
Definition at line 711 of file Environment.php.
getTemplateClass | ( | $name, | |
$index = null |
|||
) |
Gets the template class associated with the given string.
string | $name | The name for which to calculate the template class name |
integer | $index | The index if it is an embedded template |
Definition at line 263 of file Environment.php.
getTemplateClassPrefix | ( | ) |
Gets the template class prefix.
Definition at line 273 of file Environment.php.
getTest | ( | $name | ) |
Gets a test by name.
string | $name | The test name |
Definition at line 885 of file Environment.php.
getTests | ( | ) |
Gets the registered Tests.
Definition at line 869 of file Environment.php.
getTokenParsers | ( | ) |
Gets the registered Token Parsers.
Definition at line 695 of file Environment.php.
getUnaryOperators | ( | ) |
Gets the registered unary Operators.
Definition at line 1061 of file Environment.php.
hasExtension | ( | $name | ) |
Returns true if the given extension is registered.
string | $name | The extension name |
Definition at line 601 of file Environment.php.
|
protected |
Definition at line 1136 of file Environment.php.
|
protected |
Definition at line 1115 of file Environment.php.
|
protected |
Definition at line 1098 of file Environment.php.
initRuntime | ( | ) |
Initializes the runtime environment.
Definition at line 585 of file Environment.php.
isAutoReload | ( | ) |
Checks if the auto_reload option is enabled.
Definition at line 185 of file Environment.php.
isDebug | ( | ) |
Checks if debug mode is enabled.
Definition at line 159 of file Environment.php.
isStrictVariables | ( | ) |
Checks if the strict_variables option is enabled.
Definition at line 211 of file Environment.php.
isTemplateFresh | ( | $name, | |
$time | |||
) |
Returns true if the template is still fresh.
Besides checking the loader for freshness information, this method also checks if the enabled extensions have not changed.
string | $name | The template name |
timestamp | $time | The last modification time of the cached template |
Definition at line 349 of file Environment.php.
loadTemplate | ( | $name, | |
$index = null |
|||
) |
Loads a template by name.
string | $name | The template name |
integer | $index | The index if it is an embedded template |
Definition at line 310 of file Environment.php.
mergeGlobals | ( | array | $context | ) |
Merges a context with the defined globals.
array | $context | An array representing the context |
Definition at line 1043 of file Environment.php.
parse | ( | Twig_TokenStream | $tokens | ) |
Parses a token stream.
Twig_TokenStream | $tokens | A Twig_TokenStream instance |
Definition at line 477 of file Environment.php.
registerUndefinedFilterCallback | ( | $callable | ) |
Definition at line 817 of file Environment.php.
registerUndefinedFunctionCallback | ( | $callable | ) |
Definition at line 964 of file Environment.php.
removeExtension | ( | $name | ) |
Removes an extension by name.
This method is deprecated and you should not use it.
string | $name | The extension name |
Definition at line 645 of file Environment.php.
render | ( | $name, | |
array | $context = array() |
||
) |
Renders a template.
string | $name | The template name |
array | $context | An array of parameters to pass to the template |
Definition at line 286 of file Environment.php.
resolveTemplate | ( | $names | ) |
Definition at line 361 of file Environment.php.
setBaseTemplateClass | ( | $class | ) |
Sets the base template class for compiled templates.
string | $class | The base template class name |
Definition at line 133 of file Environment.php.
setCache | ( | $cache | ) |
Sets the cache directory or false if cache is disabled.
string | false | $cache | The absolute path to the compiled templates, or false to disable cache |
Definition at line 232 of file Environment.php.
setCharset | ( | $charset | ) |
Sets the default template charset.
string | $charset | The default charset |
Definition at line 567 of file Environment.php.
setCompiler | ( | Twig_CompilerInterface | $compiler | ) |
Sets the Compiler instance.
Twig_CompilerInterface | $compiler | A Twig_CompilerInterface instance |
Definition at line 501 of file Environment.php.
setExtensions | ( | array | $extensions | ) |
Registers an array of extensions.
array | $extensions | An array of extensions |
Definition at line 659 of file Environment.php.
setLexer | ( | Twig_LexerInterface | $lexer | ) |
Sets the Lexer instance.
Twig_LexerInterface | A Twig_LexerInterface instance |
Definition at line 428 of file Environment.php.
setLoader | ( | Twig_LoaderInterface | $loader | ) |
Sets the Loader instance.
Twig_LoaderInterface | $loader | A Twig_LoaderInterface instance |
Definition at line 543 of file Environment.php.
setParser | ( | Twig_ParserInterface | $parser | ) |
Sets the Parser instance.
Twig_ParserInterface | A Twig_ParserInterface instance |
Definition at line 465 of file Environment.php.
tokenize | ( | $source, | |
$name = null |
|||
) |
Tokenizes a source code.
string | $source | The template source code |
string | $name | The template name |
Definition at line 441 of file Environment.php.
|
protected |
Definition at line 1201 of file Environment.php.
|
protected |
Definition at line 24 of file Environment.php.
|
protected |
Definition at line 29 of file Environment.php.
|
protected |
Definition at line 42 of file Environment.php.
|
protected |
Definition at line 25 of file Environment.php.
|
protected |
Definition at line 21 of file Environment.php.
|
protected |
Definition at line 28 of file Environment.php.
|
protected |
Definition at line 23 of file Environment.php.
|
protected |
Definition at line 38 of file Environment.php.
|
protected |
Definition at line 30 of file Environment.php.
|
protected |
Definition at line 45 of file Environment.php.
|
protected |
Definition at line 33 of file Environment.php.
|
protected |
Definition at line 44 of file Environment.php.
|
protected |
Definition at line 35 of file Environment.php.
|
protected |
Definition at line 36 of file Environment.php.
|
protected |
Definition at line 26 of file Environment.php.
|
protected |
Definition at line 39 of file Environment.php.
|
protected |
Definition at line 22 of file Environment.php.
|
protected |
Definition at line 27 of file Environment.php.
|
protected |
Definition at line 31 of file Environment.php.
|
protected |
Definition at line 37 of file Environment.php.
|
protected |
Definition at line 46 of file Environment.php.
|
protected |
Definition at line 40 of file Environment.php.
|
protected |
Definition at line 43 of file Environment.php.
|
protected |
Definition at line 34 of file Environment.php.
|
protected |
Definition at line 41 of file Environment.php.
|
protected |
Definition at line 32 of file Environment.php.
const VERSION = '1.13.2' |
Definition at line 19 of file Environment.php.
This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:44 - is a product of SAS. All rights reserved.