Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: patTemplate

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

Abstract Class patTemplate_Reader

Description

Base class for patTemplate readers

This class is able to parse patTemplate tags from any string you hand it over It will emulate some kind of SAX parsing by calling start-, end- and CData-handlers.

Located in /pattemplate/patTemplate/Reader.php (line 74)

Abstract class patTemplate_Module

Abstract class patTemplate_Reader   (Subpackage Readers)
Direct descendents
Class Description
ClasspatTemplate_Reader_String patTemplate Reader that reads from a string
ClasspatTemplate_Reader_File patTemplate Reader that reads from a file
ClasspatTemplate_Reader_DB patTemplate Reader that reads from a database using PEAR::DB
ClasspatTemplate_Reader_IT patTemplate reader that reads HTML_Template_IT files
Variable Summary
Variable array $_path
Variable array $_templates
Variable object $_tmpl
Method Summary
Method void addFunctionAlias (string $alias, string $function)
Method string getCurrentInput ()
Method string getTemplateRoot ()
Method boolean isInUse ()
Abstract method string loadTemplate (mixed $input, [array $options = array()])
Abstract method array readTemplates (mixed $input, [array $options = array()])
Method void setOptions (array $options)
Method void setRootAttributes (array $attributes)
Method boolean shouldMaintainBc ()
Variables
array $_path = array() (line 124)

path to the template

  • access: protected
array $_templates = array() (line 117)

templates that have been found

  • access: protected
object $_tmpl (line 82)

reference to the patTemplate object that instantiated the module

  • access: protected

Inherited Variables

Inherited from patTemplate_Module

Variable patTemplate_Module::$_name
Variable patTemplate_Module::$_params
Methods
addFunctionAlias (line 291)

add an alias for a function

  • access: public
void addFunctionAlias (string $alias, string $function)
  • string $alias: alias
  • string $function: function name
getCurrentInput (line 1518)

get the current input

  • access: public
string getCurrentInput ()
getTemplateRoot (line 1559)

get the template root for this reader

  • access: public
string getTemplateRoot ()
isInUse (line 1548)

returns, whether the reader currently is in use

  • access: public
boolean isInUse ()
loadTemplate (line 260)

load template from any input

If the a template is loaded, the content will not get analyzed but the whole content is returned as a string.

  • return: template content
  • abstract: must be implemented in the template readers
string loadTemplate (mixed $input, [array $options = array()])
  • mixed $input: input to load from. This can be a string, a filename, a resource or whatever the derived class needs to read from
  • array $options: options, not implemented in current versions, but future versions will allow passing of options

Redefined in descendants as:
readTemplates (line 243)

read templates from any input

  • return: template structure
  • abstract: must be implemented in the template readers
array readTemplates (mixed $input, [array $options = array()])
  • mixed $input: input to read from. This can be a string, a filename, a resource or whatever the derived class needs to read from
  • array $options: options, not implemented in current versions, but future versions will allow passing of options

Redefined in descendants as:
setOptions (line 271)

set options

  • access: public
void setOptions (array $options)
  • array $options: array containing options
setRootAttributes (line 302)

set the root attributes

  • access: public
void setRootAttributes (array $attributes)
  • array $attributes: array containing options
setTemplateReference (line 229)

set a reference to the patTemplate object that instantiated the reader

  • access: public
void setTemplateReference (object patTemplate &$tmpl)
shouldMaintainBc (line 1534)

tests whether the reader should maintain backwards compatibility

If enabled, you can still use 'default', 'empty', 'odd' and 'even' instead of '__default', '__empty', etc.

This will be disabled by default in future versions.

  • access: public
boolean shouldMaintainBc ()

Inherited Methods

Inherited From patTemplate_Module

 patTemplate_Module::getName()
 patTemplate_Module::getParam()
 patTemplate_Module::setParams()

Documentation generated on Mon, 05 Mar 2007 21:19:57 +0000 by phpDocumentor 1.3.1