Provides an object-oriented template system for PHP5.
Savant3 helps you separate business logic from presentation logic using PHP as the template language. By default, Savant3 does not compile templates. However, you may pass an optional compiler object to compile template source to include-able PHP code. It is E_STRICT compliant for PHP5.
Please see the documentation at http://phpsavant.com/, and be sure to donate! :-)
Located in /Savant3.php (line 46)
Array of configuration parameters.
Constructor.
Adds to the callbacks used when calling $this->escape().
Each parameter passed to this function is treated as a separate callback. For example:
Adds filter callbacks to the stack of filters.
Adds to the search path for templates and resources.
Reports the API version for this class.
Runs all filter callbacks on buffered output.
Sets variables for the template (by copy).
This method is overloaded; you can assign all the properties of an object, an associative array, or a single value by name.
You are not allowed to assign any variable named '__config' as it would conflict with internal configuration tracking.
In the following examples, the template will have two variables assigned to it; the variables will be known inside the template as "$this->var1" and "$this->var2".
Sets variables for the template (by reference).
You are not allowed to assign any variable named '__config' as it would conflict with internal configuration tracking.
Displays a template directly (equivalent to
Prints a value after escaping it for output.
You can override the predefined escaping callbacks by passing added parameters as replacement callbacks.
Returns an error object or throws an exception.
Applies escaping to a value.
You can override the predefined escaping callbacks by passing added parameters as replacement callbacks.
Unfortunately, a call to "echo htmlspecialchars()" is twice as fast as a call to "echo $this->escape()" under the default escaping (which is htmlspecialchars). The benchmark showed 0.007 seconds for htmlspecialchars(), and 0.014 seconds for $this->escape(), on 300 calls each.
Compiles, executes, and filters a template source.
Searches the directory paths for a given file.
Returns a copy of the Savant3 configuration parameters.
Gets the array of output-escaping callbacks.
Tests if an object is of the Savant3_Error class.
Returns an internal plugin object; creates it as needed.
Sets __autoload() usage on or off.
Sets a custom compiler/pre-processor callback for template sources.
By default, Savant3 does not use a compiler; use this to set your own custom compiler (pre-processor) for template sources.
Sets the custom error text for __toString().
Clears then sets the callbacks to use when calling $this->escape().
Each parameter passed to this function is treated as a separate callback. For example:
Sets whether or not exceptions will be thrown.
Sets whether or not variables will be extracted.
Resets the filter stack to the provided list of callbacks.
Sets an entire array of search paths for templates or resources.
Sets config array for a plugin.
Sets the template name to use.
Compiles a template and returns path to compiled script.
By default, Savant does not compile templates, it uses PHP as the markup language, so the "compiled" template is the same as the source template.
Used inside a template script like so:
Executes a main plugin method with arbitrary parameters.
Magic method to echo this object as template output.
Note that if there is an error, this will output a simple error text string and will not return an error object. Use fetch() to get an error object when errors occur.
Documentation generated on Tue, 31 Mar 2009 16:24:42 -0500 by phpDocumentor 1.4.2