Comments: on this page. Click to read or post your own.

Class SimpleTag

Description

HTML or XML tag.

Located in /sapphire/dev/simpletest/tag.php (line 21)


	
			
Direct descendents
Class Description
SimpleBaseTag Base url.
SimpleTitleTag Page title.
SimpleAnchorTag Link.
SimpleWidget Form element.
SimpleLabelTag Tag to keep track of labels.
SimpleFormTag Tag to aid parsing the form.
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 ( &$tag, SimpleTag $tag)
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)
Variables
mixed $_attributes (line 23)
mixed $_content (line 24)
mixed $_name (line 22)
Methods
Constructor SimpleTag (line 34)

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. Note that the keys must have been converted to lower case.
addContent (line 68)

Appends string content to the current content.

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

Redefined in descendants as:
addTag (line 77)

Adds an enclosed tag to the content.

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

Redefined in descendants as:
expectEndTag (line 46)

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

Accessor for an attribute.

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

List of legal child elements.

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

Accessor for the whole content so far.

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

Accessor for tag name.

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

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

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

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

Sets an attribute.

  • return: New attribute value.
  • access: protected
string _setAttribute (string $label,  $value)
  • string $label: Attribute name.
  • $value
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:46:49 +1300 by phpDocumentor 1.3.2