HTML_Template_Flexy
An extremely flexible Template core, with multiple engines.
- Introduction — What HTML_Template_Flexy can do
- Configuration Options — Setting the defaults for HTML_Template_Flexy
- new HTML_Template_Flexy — constructor
- $flexy->compile() — Converts a template from markup to PHP if required
- $flexy->outputObject() — Merges a controller object with the template and outputs the result
- $flexy->bufferedOutputObject() — Merges a controller object with the template and returns the result
- $flexy->getElements() — Fetch Dynamic HTML Elements from template
- new HTML_Template_Flexy_Element — Class constructor
- $element->setValue() — Utility function to set or store values from common tag types.
- $element->setOptions() — Utility function equivilant to HTML_Select - loadArray **
- $element->removeAttributes() — Removes an attributes
- $element->setAttributes() — Sets the HTML attributes
- $element->toHtml — Output HTML and children
- $element->toHtmlnoClose() — Output Open Tag and any children and not Child tag (designed for use with <form + hidden elements>
- $factory->freeze() — freeze - freeze's an element. - just copies the value to the override.
- $factory->fromArray() — fromArray - builds a set of elements from a key=>value array (eg. DO->toArray()) the second parameter is an optional HTML_Element array to merge it into.
- $factory->fromArrayPrefixed() — fromArrayPrefixed - takes a multi dimensional array, and builds the 'xxx[sss][xx]' => value
- $factory->setОшибки() — setОшибки - sets the suffix of an element to a value..
- $factory->setRequired() — setRequired - sets the prefix of an element to a value..
- {variable} — creates PHP code to echo a variable
- {method(arguments,#quoted arguments#)} — creates a PHP method call, and echos the results
- {foreach:variable,key,value} — creates a PHP foreach loop
- {if:variable} — creates a PHP if statement
- {end:} — closes an if or foreach block
- {else:} — adds an PHP else in an if block
- <FORM NAME="name" — configures automatic form elements
- <INPUT NAME="name"> — creates PHP variable for input values
- <TEXTAREA NAME="name"> — creates PHP variable for textarea value
- <SELECT NAME="name"> — creates PHP variable and code for select lists
- flexy:if="variable or method()" — creates a PHP if conditional tag
- flexy:foreach="variable,key,value" — creates a PHP foreach loop using a html attribute
- flexy:start="here" — Start the output, using this tag and its children.
- flexy:startchildren="here" — Start the output using its children.
- flexy:ignore="yes" — Prevent Automatic form value replacement
- flexy:nameuses="variable" — Use a variable in the name for a flexy form element
- <FLEXY:TOJAVASCRIPT JSVAR="PHPVAR"> ... — Provides a simple way to pass data from PHP to Javascript