Class SimpleTag

Description

HTML or XML tag.

Located in /tag.php (line 116)


	
			
Direct descendents
Class Description
 class SimpleBaseTag Base url.
 class SimpleTitleTag Page title.
 class SimpleAnchorTag Link.
 class SimpleWidget Form element.
 class SimpleLabelTag Tag to keep track of labels.
 class SimpleFormTag Tag to aid parsing the form.
 class SimpleFrameTag Tag to aid parsing the frames in a page.
Method Summary
 SimpleTag __construct (string $name, hash $attributes)
 void addContent (string $content)
 void addTag (SimpleTag $tag)
 void addTags (array $tags)
 boolean expectEndTag ()
 string getAttribute (string $label)
 array getChildElements ()
 string getContent ()
 string getTagName ()
 string getText ()
 boolean isId (string $id)
 boolean isPrivateContent ()
 string setAttribute (string $label,  $value)
Methods
Constructor __construct (line 129)

Starts with a named tag with attributes only.

SimpleTag __construct (string $name, hash $attributes)
  • string $name: Tag name.
  • hash $attributes: Attribute names and string values. Note that the keys must have been converted to lower case.

Redefined in descendants as:
addContent (line 163)

Appends string content to the current content.

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

Redefined in descendants as:
addTag (line 173)

Adds an enclosed tag to the content.

  • access: public
void addTag (SimpleTag $tag)

Redefined in descendants as:
addTags (line 180)

Adds multiple enclosed tags to the content.

void addTags (array $tags)
  • array $tags: List of SimpleTag objects to be added.
expectEndTag (line 141)

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 210)

Accessor for an attribute.

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

List of legal child elements.

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

Accessor for the whole content so far.

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

Accessor for tag name.

  • return: Name of tag.
  • access: public
string getTagName ()
getText (line 244)

Accessor for content reduced to visible text. Acts like a text mode browser, normalising space and reducing images to their alt text.

  • return: Content as plain text.
  • access: public
string getText ()
isId (line 254)

Test to see if id attribute matches.

  • return: True on match.
  • access: public
boolean isId (string $id)
  • string $id: ID to test against.
isPrivateContent (line 154)

The current tag should not swallow all content for itself as it's searchable page content. Private content tags are usually widgets that contain default values.

  • return: False as content is available to other tags by default.
  • access: public
boolean isPrivateContent ()

Redefined in descendants as:
setAttribute (line 224)

Sets an attribute.

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

Documentation generated on Sun, 31 Oct 2010 16:32:38 -0500 by phpDocumentor 1.4.3