XiTemplate Home Page XiTemplate
[ class tree: XiTemplate ] [ index: XiTemplate ] [ all elements ]

Class: XiTemplate

Source Location: /class.XiTemplate.php

Class Overview


XiTemplate is a very fast and very easy to use PHP template engine that enables a developer to completely seperate logic from presentation.


Author(s):

Version:

  • 1.0.1

Copyright:

  • Copyright (c) 2004, Travis Miller, Jim Grill

Variables

Methods



Class Details

[line 35]
XiTemplate is a very fast and very easy to use PHP template engine that enables a developer to completely seperate logic from presentation.



Tags:

license:  GNU Public License
tutorial:  XiTemplate Manual
copyright:  Copyright (c) 2004, Travis Miller, Jim Grill
author:  Travis Miller <tmiller@web-1hosting.net>
author:  Jim Grill <jimgrill@jimgrill.com>
version:  1.0.1


[ Top ]


Class Variables

$nullValue =  ''

[line 81]

what to assign to unassigned template variables. Defaults to ''. Sometimes a null value is desired, but if you are parsing a table and a null value populates a cell this can cause problems. In this case setting $nullValue to &nbsp; might be a better idea.Note: Sometimes it may be desireable to set a null value temporarily. To achieve this simply reset null values to ''.



Tags:


Type:   string


[ Top ]



Class Methods


constructor __construct [line 93]

object __construct( string $template)

XiTemplate constructor, loads the template text from file or buffer and instantiates the XiTemplate object.



Tags:



Parameters:

string   $template  

[ Top ]

method assign [line 258]

void assign( string $templateVariable, [mixed $value = ''])

Assign a value to a template variable. $value can be either a string or a single or multidimensional array.



Tags:



Parameters:

string   $templateVariable  
mixed   $value  

[ Top ]

method out [line 390]

void out( [string $blockName = 'main'])

Outputs a parsed block of a template to the browser. Will generate a fatal error if $blockName does not exist in the template instance.



Tags:

access:  public
example:  Example usage of out()
example:  HTML template used in this example
example:  Resulting HTML after parsing


Parameters:

string   $blockName  

[ Top ]

method parse [line 277]

void parse( [string $blockName = 'main'])

Parse a block of the template replacing parsed blocks and variables.



Tags:

access:  public
example:  Example usage of parse()
example:  HTML template used in this example
example:  Resulting HTML after parsing


Parameters:

string   $blockName  

[ Top ]

method reset [line 356]

void reset( string $blockName)

Resets a parsed block to empty.



Tags:

access:  public


Parameters:

string   $blockName  

[ Top ]

method rparse [line 340]

void rparse( [string $blockName = 'main'])

Parse a block of the template and all sub-blocks under it.



Tags:

access:  public
example:  Example usage of rparse()
example:  HTML template used in this example
example:  Resulting HTML after parsing


Parameters:

string   $blockName  

[ Top ]

method text [line 369]

string text( [string $blockName = 'main'])

Returns parsed block of template.



Tags:

return:  parsedBlock
access:  public


Parameters:

string   $blockName  

[ Top ]


Documentation generated on Fri, 20 Aug 2004 10:57:43 -0500 by phpDocumentor 1.3.0RC3