Comunitatea PHP Romania
 

 
HTML_Template_Flexy

HTML_Template_Flexy

Table of Contents
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->setErrors() -- setErrors - 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 it's children.
flexy:startchildren="here" -- Start the output using it's 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

An extremely flexible Template core, with multiple engines.

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
la birou
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
Mascka Mascka
Braila
raul_ raul_
whooper whooper
Toronto ON
mihaitha mihaitha
Sibiu
gabysolomon gabysolomon
Bacau
oriceon oriceon
Constanta
garlicinicolae garlicinicolae

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Libros arquitectura | Tile | Unsecured Loans | Free Verizon Ringtones | Northern Rock
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis