Crafty main class implementation
This is the main class of the Crafty template engine. You should always instantiate this and make use of it's member functions. See also the Crafty Usage and Syntax manual for further information.
Located in /crafty/Crafty.class.php (line 80)
Object handle of a Compiler object
If compiling is neccessary (display modes CRAFTY_COMPILE_AUTO and CRAFTY_COMPILE_ALWAYS), this will contain an object handle of a Crafty_Compiler object. It is only for internal use.
Path to Crafty directory
Stores the absolute path to the Crafty directory. It is set by the constructor, so you will have to pass it at least once.
Root path to the compiled templates
Stores the absolute path to the compiled template files. This is automatically set by the constructor, you will not have to take care of it.
Stores assigned values
This array is used to store the values assigned to this template by assign(), assignRef(), append() or appendRef().
Initializes a Crafty instance
The constructor intializes a Crafty instance and sets up the neccessary internal path variables. It also includes the Exception classes. You have to pass the absolute or relative path to the constructor so Crafty can find it's files.
From version 1.0.1 the parameter is optional and will be acquired using the __FILE__ magic constant by default.
Append a content to an data array
Appends content $data to the assigned data array $name. $data will allways be appended at the end.
If the array is not yet assigned, a new one will be created, if only a value is set this value will be used as first element of the array and $data as the second one.
If $index is set it will not just append to the main array but append with a $index as key for the main array. However this will not influence the order of the displayed blocks.
If $index_sub is set it will create and append the following array:
array($index_sub => $data) then the value of $index can be used as variablename inside a blocklist, instead of $value. This is useful for cascaded blocklists.
Append a reference to an data array
Same as append(), but uses an reference instead of "real" values.
Assign a variable content
This assigns a variable content to a template before its beeing displayed by display(). If $extract is true and data is an associative array, every key will be taken as sub-variable and the corresponding value as sub-variable content. The array itself will still be assigned. $extract also works recursive
Assign variable content as reference
This assigns a variable content as reference. So you can first assign the variable and then manipulate it's content. There's no extraction for references like in assign().
Display template
Displays template $template_name in compilation mode $compile_mode. Call this from your file after all values are assigned.
Error handler method for compiled templates
See http://www.php.net/set_error_handler for the parameters.
Checks security integrity of a string
This checks whether or not it is secure to print the string $param in a template. If not, an exception will be thrown, and Crafty will refuse further work.
Documentation generated on Sat, 19 Feb 2005 01:43:38 +0100 by phpDocumentor 1.3.0RC3