Class SimpleTag

Description

HTML or XML tag.

Located in /libraries/pear/simpletest/tag.php (line 20)


	
			
Direct descendents
Class Description
 class SimpleTitleTag Page title.
 class SimpleAnchorTag Link.
 class SimpleWidget Form element.
 class SimpleFormTag Tag to aid parsing the form.
 class SimpleFrameTag Tag to aid parsing the frames in a page.
Variable Summary
 mixed $_attributes
 mixed $_content
 mixed $_name
Method Summary
 SimpleTag SimpleTag (string $name, hash $attributes)
 void addContent (string $content)
 void addTag (SimpleTag &$tag)
 boolean expectEndTag ()
 string getAttribute (string $label)
 array getChildElements ()
 string getContent ()
 string getTagName ()
 hash _keysToLowerCase (hash $map)
 string _setAttribute (string $label, mixed $value)
Variables
mixed $_attributes (line 22)
mixed $_content (line 23)
mixed $_name (line 21)
Methods
Constructor SimpleTag (line 31)

Starts with a named tag with attributes only.

SimpleTag SimpleTag (string $name, hash $attributes)
  • string $name: Tag name.
  • hash $attributes: Attribute names and string values.
addContent (line 66)

Appends string content to the current content.

  • access: public
void addContent (string $content)
  • string $content: Additional text.

Redefined in descendants as:
addTag (line 75)

Adds an enclosed tag to the content.

  • access: public
void addTag (SimpleTag &$tag)

Redefined in descendants as:
expectEndTag (line 57)

Check to see if the tag can have both start and end tags with content in between.

  • return: True if content allowed.
  • access: public
boolean expectEndTag ()

Redefined in descendants as:
getAttribute (line 102)

Accessor for an attribute.

  • return: Attribute value.
  • access: public
string getAttribute (string $label)
  • string $label: Attribute name.
getChildElements (line 92)

List oflegal child elements.

  • return: List of element names.
  • access: public
array getChildElements ()
getContent (line 128)

Accessor for the whole content so far.

  • return: Content as big string.
  • access: public
string getContent ()
getTagName (line 83)

Accessor for tag name.

  • return: Name of tag.
  • access: public
string getTagName ()
_keysToLowerCase (line 43)

Make the keys lower case for case insensitive look-ups.

  • return: Unchanged values, but keys lower case.
  • access: private
hash _keysToLowerCase (hash $map)
  • hash $map: Hash to convert.
_setAttribute (line 119)

Sets an attribute.

  • return: New attribute value.
  • access: protected
string _setAttribute (string $label, mixed $value)
  • string $label: Attribute name.

Documentation generated on Fri, 10 Dec 2004 18:26:36 +0000 by phpDocumentor 1.3.0RC3