API Joomla 1.5.26
Documentation des API du CMS Joomla en version 1.5
|
patTemplate_Reader::_addToParentTag | ( | $ | property, |
$ | value, | ||
$ | key = null |
||
) |
add to a property of the parent tag
private
string | property to add to |
mixed | value to add |
string | key |
patTemplate_Reader::_addToParentTemplate | ( | $ | property, |
$ | value, | ||
$ | key = null |
||
) |
add to a property of the parent template
private
string | property to add to |
mixed | value to add |
string | key |
patTemplate_Reader::_adjustWhitespace | ( | $ | data, |
$ | behaviour | ||
) |
adjust whitespace in a CData block
private
string | data |
string | behaviour |
Références $data.
patTemplate_Reader::_buildTemplateName | ( | ) |
build a template name
private
patTemplate_Reader::_characterData | ( | $ | data, |
$ | readFromTemplate = true |
||
) |
patTemplate_Reader::_closeLink | ( | $ | tmpl | ) |
close a link template
It will be added to the dependecies of the parent template.
private
array | template definition for the link |
add it to the dependencies
patTemplate_Reader::_closeSubTemplate | ( | $ | subTmpl, |
$ | data | ||
) |
patTemplate_Reader::_closeTemplate | ( | $ | tmpl, |
$ | data | ||
) |
close the current template
private
check for special templates
check for whitespace in conditional templates and raise a notice
store the content
No external template
add it to the dependencies
Références $data, $name, et patErrorManager::raiseNotice().
patTemplate_Reader::_createErrorMessage | ( | $ | msg | ) |
create an error message
This method takes an error messages and appends the current line number as well as a pointer to the input (filename)
private
string | base error message |
patTemplate_Reader::_endElement | ( | $ | ns, |
$ | name | ||
) |
handle end element
private
string | element name |
handle tag
template
sub-template
link
variable
instance
comment
custom function
Références $data, $name, patErrorManager::isError(), et patErrorManager::raiseError().
patTemplate_Reader::_getCData | ( | ) |
get the character data of the element
private
patTemplate_Reader::_getCurrentLine | ( | ) |
get the current line number
private
patTemplate_Reader::_getFromParentTemplate | ( | $ | property | ) |
get a property of the parent template
private
string | property to add to |
patTemplate_Reader::_handleComment | ( | $ | attributes, |
$ | data | ||
) |
handle a comment
private
array | attributes of the comment tag |
string | cdata between the tags (will be used as default) |
Références $data.
patTemplate_Reader::_handleVariable | ( | $ | attributes, |
$ | data | ||
) |
handle a variable
private
array | attributes of the var tag |
string | cdata between the tags (will be used as default) |
get name
use data as default value
add it to template, if it's not hidden
copy value from any other variable
Références $data, $name, $type, elseif, et patErrorManager::raiseError().
patTemplate_Reader::_inheritAttributes | ( | $ | attributes | ) |
inherit attributes from the parent template
The following attributes are inherited automatically:
private
array | attributes |
array | attributes with inherited attributes |
patTemplate_Reader::_initLink | ( | $ | attributes | ) |
handle a Link
private
array | attributes |
needs a src attribute
create a new template
Références patErrorManager::raiseError().
patTemplate_Reader::_initSubTemplate | ( | $ | attributes | ) |
create a new sub-template
private
array | attributes |
has to be embedded in a 'tmpl' tag
needs a condition attribute
maintain BC
Références elseif, et patErrorManager::raiseError().
patTemplate_Reader::_initTemplate | ( | $ | attributes | ) |
create a new template
private
array | attributes |
build name for the template
name must be unique
update the path
create a new template
prepare subtemplates
Références $name, et patErrorManager::raiseNotice().
patTemplate_Reader::_parentTagIs | ( | $ | type | ) |
checks, whether the parent tag is of a certain type
This is needed to ensure, that subtemplates are only placed inside a template
private
string | type (tmpl, sub, var, link) |
Références $type.
patTemplate_Reader::_parseAttributes | ( | $ | string | ) |
parse an attribute string and build an array
private
string | attribute string |
array | attribute array |
Références $i.
patTemplate_Reader::_prepareTmplAttributes | ( | $ | attributes, |
$ | templatename | ||
) |
prepare attributes
private
array | attributes |
string | template name (only used for error messages) |
do not prepare twice
get the attributes
external template
varscope is set
varscope is parent
validate condition template
validate simplecondition template
oddeven => switch to new modulo syntax
modulo => requires a module attribute
standard template => do nothing
unknown type
Références patErrorManager::raiseError().
patTemplate_Reader::_startElement | ( | $ | ns, |
$ | name, | ||
$ | attributes | ||
) |
handle start element
private
string | element name |
array | attributes |
handle tag
template
sub-template
link
variable
instance
any other tag
Références $name, patErrorManager::isError(), et patErrorManager::raiseError().
patTemplate_Reader::addFunctionAlias | ( | $ | alias, |
$ | function | ||
) |
add an alias for a function
public
string | alias |
string | function name |
patTemplate_Reader::getCurrentInput | ( | ) |
get the current input
public
patTemplate_Reader::getTemplateRoot | ( | ) |
get the template root for this reader
public
patTemplate_Reader::isInUse | ( | ) |
returns, whether the reader currently is in use
public
patTemplate_Reader::loadTemplate | ( | $ | input, |
$ | options = array() |
||
) |
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.
must be implemented in the template readers
mixed | input to load from. This can be a string, a filename, a resource or whatever the derived class needs to read from |
array | options, not implemented in current versions, but future versions will allow passing of options |
patTemplate_Reader::parseString | ( | $ | string | ) |
parse templates from string
private
string | string to parse |
apply input filter before parsing
create a special root template
start parsing
the first token is always character data Though it could just be empty
check, whether it's a known namespace currently only the template namespace is possible
is it a closing tag?
Is empty or opening tag!
check, if the tag is empty
check for tags that are still open
Réimplémentée dans patTemplate_Reader_IT.
Références $data, $i, patErrorManager::isError(), et patErrorManager::raiseError().
patTemplate_Reader::readTemplates | ( | $ | input, |
$ | options = array() |
||
) |
read templates from any input
must be implemented in the template readers
mixed | input to read from. This can be a string, a filename, a resource or whatever the derived class needs to read from |
array | options, not implemented in current versions, but future versions will allow passing of options |
patTemplate_Reader::setOptions | ( | $ | options | ) |
set options
public
array | array containing options |
patTemplate_Reader::setRootAttributes | ( | $ | attributes | ) |
set the root attributes
public
array | array containing options |
patTemplate_Reader::setTemplateReference | ( | &$ | tmpl | ) |
set a reference to the patTemplate object that instantiated the reader
public
object | patTemplate object |
patTemplate_Reader::shouldMaintainBc | ( | ) |
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.
public
patTemplate_Reader::$_currentInput = null |
patTemplate_Reader::$_data |
patTemplate_Reader::$_defaultAtts = array() |
patTemplate_Reader::$_depth |
patTemplate_Reader::$_elStack |
patTemplate_Reader::$_endTag |
patTemplate_Reader::$_funcAliases = array() |
patTemplate_Reader::$_functions = array() |
patTemplate_Reader::$_inheritAtts = array() |
patTemplate_Reader::$_inUse = false |
patTemplate_Reader::$_options = array() |
patTemplate_Reader::$_path = array() |
patTemplate_Reader::$_processedData = null |
patTemplate_Reader::$_root = null |
patTemplate_Reader::$_rootAtts = array() |
patTemplate_Reader::$_startTag |
patTemplate_Reader::$_templates = array() |
patTemplate_Reader::$_tmpl |
patTemplate_Reader::$_tmplStack |