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

Class: TagComponent

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

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

Class Overview

Component
   |
   --TagComponent

Base class for runtime components that output XML tags

Variables

Methods


Child classes:

FormComponent
The FormComponent provide a runtime API for control the behavior of a form
FormElement
Base class for concrete form elements
LabelComponent
Represents an HTML label tag
TagWidget
Allows a tag to be created, which cannot contain children e.g.
TagContainerWidget
Allows a tag to be created, which can contain children

Inherited Variables

Inherited Methods

Class: Component

Component::addChild()
Adds a reference to a child component to this component, using it's ID attribute as the child array key
Component::findChild()
Returns a child component given it's ID.
Component::findChildByClass()
Returns the first child component matching the supplied WACT_TEMPLATE Component PHP class name
Component::findParentByClass()
Recursively searches through parents of this component searching for a given WACT_TEMPLATE component PHP class name
Component::getChild()
Same as find child, except raises error if child is not found
Component::getServerId()
Returns the ID of the component, as defined in the template tags ID attribute
Component::render()
Outputs the component, rendering any child components as well This method will only ever be called on components that support Dynamic rendering.
Component::setChildDataSource()
set the data source of a child component, or raise an error if the child is not found.

Class Details

Base class for runtime components that output XML tags
abstract:  
access:  public
see:  http://wact.sourceforge.net/index.php/TagComponent

Class Variables


$attributes = array()

Array of XML attributes
access:  private
Type:   array

Class Methods


method getAttribute

Returns the value of an attribute, given it's name

string getAttribute( string $attrib)

API Tags:

return:  value of attribute
access:  public

Overridden in child classes as:

FormElement::getAttribute()
Overrides TagComponent method so that requests for the value of the attribute named "value" return the value from the FormComponent DataSource, if it exists.
CheckableFormElement::getAttribute()
Routes call to TagComponent::getAttribute

Parameters:

string   $attrib   name of attribute

method getCanonicalAttributeName

returns the case-preserving, case-insensitive name of an attribute

string getCanonicalAttributeName( string $attrib)

API Tags:

return:  canonical name of attribute
access:  private

Parameters:

string   $attrib   name of attribute

method getClientId

Returns the value of the ID attribute

string getClientId( string 0)

API Tags:

access:  public

Parameters:

string   0   component class name

method hasAttribute

Check to see whether a named attribute exists

boolean hasAttribute( string $attrib)

API Tags:

access:  public

Parameters:

string   $attrib   name of attribute

method removeAttribute

Remove an attribute from the list

void removeAttribute( string $attrib)

API Tags:

access:  public

Parameters:

string   $attrib   name of attribute

method renderAttributes

Writes the contents of the attributes to the screen, using htmlspecialchars to convert entities in values.

Called by a compiled template



void renderAttributes( )

API Tags:

access:  public

Overridden in child classes as:

InputFormElement::renderAttributes()
Overrides then calls with the parent renderAttributes() method.
CheckableFormElement::renderAttributes()
Overrides then calls with the parent renderAttributes() method dealing


method setAttribute

Sets an attribute

void setAttribute( string $attrib, string $value)

API Tags:

access:  public

Overridden in child classes as:

FormElement::setAttribute()
Overrides TagComponent method so keep value attribute and value in form DataSource in sync
CheckableFormElement::setAttribute()
Routes call to TagComponent::setAttribute

Parameters:

string   $attrib   name of attribute
string   $value   value of attribute
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:44 -0800 by phpDocumentor 1.2.3