template 
[ doc home ] [ class tree: template ] [ index: template ] [ all elements ]

Class: T24TemplateTree

Source Location: /T24TemplateTree.php

Class Overview

IsterObject
   |
   --IsterMethodProxy
      |
      --T24TemplateTree

This class represents a parser tree of a template.


Author(s): Ingo Schramm   

Copyright: Copyright (c) 2005 Ister.ORG Ingo Schramm

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: IsterMethodProxy

IsterMethodProxy::IsterMethodProxy()
Constructor
IsterMethodProxy::getRegister()
Get the register.
IsterMethodProxy::hasAlias()
Check if an alias has been registerd.
IsterMethodProxy::hasMethod()
Check if a method has been registerd.
IsterMethodProxy::invoke()
Same as invokeNext() but the queue is reset each time the function is called.
IsterMethodProxy::invokeNext()
Invoke a registered method at a subsequent object instance.
IsterMethodProxy::lastError()
Read the last error.
IsterMethodProxy::register()
Register an object's methods to the proxy.
IsterMethodProxy::registerAlias()
Register an alias for a method.
IsterMethodProxy::reset()
Reset the queue for a given method.
IsterMethodProxy::setRegister()
Set the register.

Class: IsterObject

IsterObject::IsterObject()
Constructor
IsterObject::abstractMethodError()
Report attempt to call an abstract method.
IsterObject::addLogger()
Add an IsterLogger to process log messages.
IsterObject::deleteLogger()
Delete an already registered IsterLogger.
IsterObject::getLoggerNames()
Fetch the names of all currently registered IsterLoggers.
IsterObject::getMem()
Return maximum amount of memory an application has allocated at this point.
IsterObject::log()
Trigger a log message.
IsterObject::passPHPmessage()
Catch PHP E_WARNING and E_NOTICE messages.
IsterObject::serialize()
Serialize the object.
IsterObject::setLogLocal()
Set logging local for the current object.
IsterObject::setupLogger()
Setup a logger.
IsterObject::triggerError()
Alias for log();
IsterObject::unserialize()
Unserialize the object.
IsterObject::__sleep()
Executed prior to serialize().
IsterObject::__wakeup()
Executed prior to unserialize().

Class Details

This class represents a parser tree of a template.

If you need to merge another tree in this tree, you can use getTree(), then merge the other tree, then setTree() (this was in earlier versions done using deleted method rplcTreeNode()).


copyright:  Copyright (c) 2005 Ister.ORG Ingo Schramm
author:  Ingo Schramm


[ Top ]


Class Methods


constructor T24TemplateTree

T24TemplateTree T24TemplateTree( object T24FunctionContainer &$fcontainer)

Constructor

Parameters:

object T24FunctionContainer   &$fcontainer  

[ Top ]

method addFuncNode

boolean addFuncNode( array $params, integer $line)

Add function node to the tree.

Parameters:

array   $params  
integer   $line  

[ Top ]

method addParamNode

boolean addParamNode( string $var, string $value)

Add a parameter node to the tree.

Parameters:

string   $var  
string   $value  

[ Top ]

method addTextNode

boolean addTextNode( string $string)

Add a text node to the tree.

Parameters:

string   $string  

[ Top ]

method addVarNode

boolean addVarNode( string $name)

Add a variable node to the tree.

Parameters:

string   $name  

[ Top ]

method cleanIndex

boolean cleanIndex( integer $from, [integer $to = null])

Parameters:

integer   $from  
integer   $to  

[ Top ]

method destroy

boolean destroy( )

[ Top ]

method getStruct

array getStruct( )

Fetch the internal tree array (not recommenden).

[ Top ]

method getTree

array getTree( )

Fetch the internal tree array (not recommenden).

[ Top ]

method getVar

mixed getVar( string $name)

Fetch the value of a variable.

return:  The value on sucess or null on error.

Parameters:

string   $name   Name of the variable.

[ Top ]

method isResolved

boolean isResolved( )

Check whether the variables are already resolved.

[ Top ]

method resolve

boolean resolve( )

Resolve all variables in the tree.

[ Top ]

method setStruct

boolean setStruct( array $struct)

Fetch the internal tree array (not recommenden).

Parameters:

array   $struct  

[ Top ]

method setTree

array setTree( mixed $tree)

Fetch the internal tree array (not recommenden).

[ Top ]

method setup

boolean setup( string $name, mixed $value)

Specify setup parameters.

Recognized: string commstart, string commend, integer unregistered


Parameters:

string   $name  
mixed   $value  

[ Top ]

method setVar

boolean setVar( string $name, [mixed $value = null])

Set a variable.

Parameters:

string   $name   Name of the variable.
mixed   $value   Value of the variable.

[ Top ]

method setVarArray

boolean. setVarArray( array $table)

Set a number of variables at once.

Parameters:

array   $table   An array containing name-value-pairs of variables.

[ Top ]

method toString

string toString( )

Make a string representation of the tree.

This method returns the resulting document. It calls resolve() implicitly if not yet done.


[ Top ]

method unsetVarArray

boolean. unsetVarArray( array $table)

Unset a number of variables.

Parameters:

array   $table   An array containing name-value-pairs of variables.

[ Top ]


Documentation generated on Tue, 20 Dec 2005 11:22:18 +0100 by phpDocumentor 1.3.0RC4