This is the cache driver to use for storing bytecode and HTML caches.
This is initialized to the Sugar_Cache_File driver by default.
Directory in which bytecode and HTML caches can be stored when using the file cache driver.
Cache management. Used internally.
Maximum age of HTML caches in seconds.
Character set that output should be in.
Setting this to true will disable all caching, forcing every template to be recompiled and executed on every load.
This is the default storage driver to use when no storage driver is specified as part of a template name.
Closing delimiter character.
Opening delimiter character.
This is the error handling method Sugar should use. By default,
errors are echoed to the screen and no exceptions are thrown. Set this to one of the following:
Callback for checking method access.
This is the output escaping method to be used. This is necessary for many formats, such as XML and HTML, to ensure that special are escaped properly.
Directory to search for plugins. This can either be a single string or an array.
Directory in which templates can be found when using the file storage driver. This can either be a single string or an array.
Registers a new function to be available within templates.
Registers a new modifier to be available within templates.
Register a new storage driver.
Clear all HTML cache files.
Load, compile, and display the requested template.
Load, compile, and display a template, caching the result.
Compile and display the template source code given as a string.
It is recommended that this method be avoided in real applications, as it can have drastic performance consequences.
Constructor
Escape the input string according to the current value of Sugar::$charset.
Displays a template using Sugar::display, but returns the result as a string instead of displaying it to the user.
Displays a cached template using Sugar::displayCache, but returns the result as a string instead of displaying it to the user.
Processes template source using Sugar::displayString, but returns the result as a string instead of displaying it to the user.
It is recommended that this method be avoided in real applications, as it can have drastic performance consequences.
Get the global variable context.
Returns an array containing the data for template function. This will first look for registered functions, then it will attempt to auto-register a function using the smarty_function_foo naming scheme. Finally, it will attempt to load a function plugin.
Returns the callback for a template modifier, if it exists. This will first look for registered modifiers, then it will attempt to auto-register a modifier using the smarty_modifier_foo naming scheme. Finally, it will attempt to load a modifier plugin.
Get the value of an option
Get a runtime instance.
Get a storage driver.
Load a template object
Looks up the current value of a variable.
Process an exception according to the current value of Sugar::$errors.
Check if a given template has a valid HTML cache. If an HTML cache already exists, applications can avoid expensive database queries and other operations necessary to fill in template data.
Set a new variable to be available within templates.
Change the current delimiters.
Set the value of an option
Erases the HTML cache for a template if it exists.
CACHE_HTML
= 'chtml'
(line 105)
Passed to cache drivers to indicate that an HTML cache is requested.
CACHE_LIMIT
= 5
(line 196)
Cache expiration time in seconds.
The default cache expiration time is 3600 seconds, or one hour.
CACHE_TPL
= 'ctpl'
(line 100)
Passed to cache drivers to indicate that a compile cache is requested.
CHARSET
= 1
(line 161)
Option code for setting or retrieving the charset used during encoding.
The character set default is UTF-8. Another popular value that some applications may need is ISO-8859-1.
DEBUG
= 3
(line 179)
Option code to for toggling debug mode.
Debug mode is either true (enabled) or false (disabled). It is disabled by default.
ERRORS
= 4
(line 189)
Option code to set or get the error handling mode used during script execution.
The default error handling mode is Sugar::ERROR_PRINT. Other possible values are Sugar::ERROR_THROW, Sugar::ERROR_DIE, and Sugar::ERROR_IGNORE.
ERROR_DIE
= 102
(line 123)
The error will be printed to the user, and then die() will be called to terminate the script.
ERROR_IGNORE
= 103
(line 128)
The error will be silently ignored.
ERROR_PRINT
= 100
(line 112)
Causes all errors generated by Sugar templates to be printed to the user.
No indication of the error is returned to the calling script. This is the default behavior.
ERROR_THROW
= 101
(line 117)
Errors will be thrown as Sugar_Exception objects.
OUTPUT
= 2
(line 171)
Option code for setting or retrieving the output mode used during escaping.
The default output mode is Sugar::OUTPUT_HTML. Other possible values are Sugar::OUTPUT_XHTML, Sugar::OUTPUT_XML, and Sugar::OUTPUT_TEXT.
OUTPUT_HTML
= 200
(line 135)
All output will be escaped using htmlentities() with the ENT_QUOTES flag set, using the Sugar::$charset setting. This is the default behavior.
OUTPUT_TEXT
= 203
(line 153)
Disables all output escaping.
OUTPUT_XHTML
= 201
(line 140)
Identical to Sugar::OUTPUT_HTML.
OUTPUT_XML
= 202
(line 148)
All output will be escaped using htmlspecialchars() with the ENT_QUOTES flag set, using the Sugar::$charset setting. This differs from Sugar::OUTPUT_HTML as only <, >, ", ', and & will escaped.
VERSION
= '0.84'
(line 95)
Version of Sugar.
Documentation generated on Sat, 18 Sep 2010 05:27:02 +0000 by phpDocumentor 1.4.3