WACT_TEMPLATE
[ class tree: WACT_TEMPLATE ] [ index: WACT_TEMPLATE ] [ all elements ]

Class: ServerTagComponentTag

Source Location: /framework/template/compiler/servertagcomponent.inc.php

http://wact.sourceforge.net/index.php/ServerTagComponentTag

Class Overview

CompilerComponent
   |
   --ServerComponentTag
      |
      --ServerTagComponentTag

Server tag component tags are ServerComponentTags which also correspond to an HTML tag.

Methods


Child classes:

GenericTag
Compile time component for tags in template which are not recognized WACT tags but have a runat="server" attribute.
GenericContainerTag
GenericContainerTag is for GenericTags which can have children and can have widgets added to them at runtime.
ControlTag
Ancester tag class for input controls
FormTag
Compile time component for building runtime FormComponents
LabelTag
Compile time component for building runtime form labels

Inherited Variables

Inherited Methods

Class: ServerComponentTag

ServerComponentTag::generateConstructor()
Calls the parent getComponentRefCode() method and writes it to the
ServerComponentTag::getComponentRefCode()
Returns a string of PHP code identifying the component in the hierarchy.

Class: CompilerComponent

CompilerComponent::addChild()
Adds a child component, by reference, to the array of children
CompilerComponent::addChildAttribute()
Sets the XML attributes for this component (as extracted from the template)
CompilerComponent::CheckNestingLevel()
Used to perform some error checking on the source template, such as examining the tag hierarchy and triggering an error if a tag is incorrectly nested.
CompilerComponent::findChild()
Returns a child component, given it's ServerID
CompilerComponent::findChildByClass()
Returns a child component, given it's compile time component class
CompilerComponent::findChildrenByClass()
Returns an array of child components, given it's compile time component class
CompilerComponent::findImmediateChildByClass()
Returns a child component, given it's compile time component class
CompilerComponent::findParentByClass()
Returns a parent component, recursively searching parents by their compile time component class name
CompilerComponent::findSelfOrParentByClass()
Extends findParentByClass to begin search at the current component then moving on to its parent, if there's no match.
CompilerComponent::generate()
Calls the local preGenerate(), generateContents() and postGenerate() methods.
CompilerComponent::generateAttributeList()
CompilerComponent::generateConstructor()
Calls the generateConstructor() method of each child component
CompilerComponent::generateContents()
Calls the generate() method of each child component
CompilerComponent::generateDynamicAttributeList()
CompilerComponent::getAttribute()
Returns the value of an XML attribute (as extracted from template) or NULL if attribute not found
CompilerComponent::getAttributesAsArray()
Returns an array containing the attributes of this component that can be resolved at compile time.
CompilerComponent::getBoolAttribute()
Return the value of a boolean attribute as a boolean.
CompilerComponent::getClientId()
Get the value of the XML id attribute
CompilerComponent::getComponentRefCode()
Gets the component reference code of the parent.
CompilerComponent::getDataSource()
If a parent compile time component exists, returns the value of the parent's getDataSource() method, which will be a concrete implementation
CompilerComponent::getDataSourceRefCode()
Gets the DataSource reference code of the parent
CompilerComponent::getLastChild()
Returns the last child added to a component
CompilerComponent::getParentDataSource()
Gets the parent in the DataSource, if one exists
CompilerComponent::getProperty()
CompilerComponent::getRootDataSource()
Gets a root DataSource
CompilerComponent::getServerId()
Returns the identifying server ID.
CompilerComponent::hasAttribute()
Check to see whether a named attribute exists
CompilerComponent::isDataSource()
CompilerComponent::postGenerate()
Post generation method, calls the WrappingComponents generateWrapperPostfix() method if the component exists
CompilerComponent::preGenerate()
Pre generation method, calls the WrappingComponents generateWrapperPrefix() method if the component exists
CompilerComponent::prepare()
Calls the prepare method for each child component, which will override
CompilerComponent::preParse()
Provides instruction to the template parser, while parsing is in
CompilerComponent::registerProperty()
register a property with this component. Currently, this component must be a database to support properties.
CompilerComponent::registerWrapper()
Set a wrapping component for this component
CompilerComponent::removeAttribute()
Remove an attribute from the list
CompilerComponent::removeChild()
Removes a child component, given it's ServerID
CompilerComponent::setAttribute()
Sets an attribute

Class Details

Server tag component tags are ServerComponentTags which also correspond to an HTML tag.

Makes it easier to implement instead of extending from the ServerComponentTag class

abstract:  
access:  public
see:  http://wact.sourceforge.net/index.php/ServerTagComponentTag

Class Methods


method generateConstructor

Writes the compiled template constructor from the runtime component,

assigning the attributes found at compile time to the runtime component via a serialized string



void generateConstructor( CodeWriter &$code)

API Tags:

access:  protected

Overridden in child classes as:

GenericContainerTag::generateConstructor()
ControlTag::generateConstructor()
InputAutoCompleteTag::generateConstructor()
LabelTag::generateConstructor()

Overrides ServerComponentTag::generateConstructor() (Calls the parent getComponentRefCode() method and writes it to the)

Parameters:

CodeWriter   &$code  

method generateExtraAttributes

Adds any additional XML attributes

void generateExtraAttributes( CodeWriter &$code)

API Tags:

access:  protected
abstract:  

Parameters:

CodeWriter   &$code  

method getRenderedTag

Returns the XML tag name

string getRenderedTag( )

API Tags:

access:  protected

method postGenerate

Writes the closing tag string to the compiled template

void postGenerate( CodeWriter &$code)

API Tags:

access:  protected

Overridden in child classes as:

GenericContainerTag::postGenerate()
SelectYearTag::postGenerate()
SelectMonthTag::postGenerate()
SelectDayTag::postGenerate()
SelectHourTag::postGenerate()
SelectMinuteTag::postGenerate()
SelectSecondTag::postGenerate()

Overrides CompilerComponent::postGenerate() (Post generation method, calls the WrappingComponents generateWrapperPostfix() method if the component exists)

Parameters:

CodeWriter   &$code  

method preGenerate

Calls the parent preGenerate() method then writes the XML tag name plus a PHP string which renders the attributes from the runtime component.

void preGenerate( CodeWriter &$code)

API Tags:

todo:  compiler needs to detect XML to allow for empty tags
access:  protected

Overridden in child classes as:

InputAutoCompleteTag::preGenerate()
SelectYearTag::preGenerate()
SelectMonthTag::preGenerate()
SelectDayTag::preGenerate()
SelectHourTag::preGenerate()
SelectMinuteTag::preGenerate()
SelectSecondTag::preGenerate()
FormTag::preGenerate()

Overrides CompilerComponent::preGenerate() (Pre generation method, calls the WrappingComponents generateWrapperPrefix() method if the component exists)

Parameters:

CodeWriter   &$code  
WACT: Copyright 2003 Procata, Inc. Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
Documentation generated on Sun, 28 Nov 2004 19:50:11 -0800 by phpDocumentor 1.2.3