Moodle  2.2.1
http://www.collinsharper.com
SimpleTag Class Reference
Inheritance diagram for SimpleTag:

Public Member Functions

 SimpleTag ($name, $attributes)
 expectEndTag ()
 isPrivateContent ()
 addContent ($content)
 addTag (&$tag)
 getTagName ()
 getChildElements ()
 getAttribute ($label)
 _setAttribute ($label, $value)
 getContent ()
 getText ()
 isId ($id)

Data Fields

 $_name
 $_attributes
 $_content

Detailed Description

Definition at line 21 of file tag.php.


Member Function Documentation

_setAttribute ( label,
value 
)

Sets an attribute.

Parameters:
string$labelAttribute name.
Returns:
string $value New attribute value. protected

Definition at line 118 of file tag.php.

Here is the caller graph for this function:

addContent ( content)

Appends string content to the current content.

Parameters:
string$contentAdditional text. public

Reimplemented in MultipleSelectionTag, and SimpleSelectionTag.

Definition at line 68 of file tag.php.

addTag ( &$  tag)

Adds an enclosed tag to the content.

Parameters:
SimpleTag$tagNew tag. public

Reimplemented in MultipleSelectionTag, and SimpleSelectionTag.

Definition at line 77 of file tag.php.

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

Returns:
boolean True if content allowed. public

Reimplemented in SimpleFrameTag, SimpleCheckboxTag, SimpleRadioButtonTag, SimpleUploadTag, SimpleButtonTag, SimpleImageSubmitTag, SimpleSubmitTag, SimpleTextTag, and SimpleBaseTag.

Definition at line 46 of file tag.php.

getAttribute ( label)

Accessor for an attribute.

Parameters:
string$labelAttribute name.
Returns:
string Attribute value. public

Definition at line 104 of file tag.php.

Here is the caller graph for this function:

List of legal child elements.

Returns:
array List of element names. public

Definition at line 94 of file tag.php.

Accessor for the whole content so far.

Returns:
string Content as big raw string. public

Definition at line 127 of file tag.php.

Here is the caller graph for this function:

Accessor for tag name.

Returns:
string Name of tag. public

Definition at line 85 of file tag.php.

getText ( )

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

Returns:
string Content as plain text. public

Definition at line 138 of file tag.php.

Here is the call graph for this function:

isId ( id)

Test to see if id attribute matches.

Parameters:
string$idID to test against.
Returns:
boolean True on match. public

Definition at line 148 of file tag.php.

Here is the call graph for this function:

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.

Returns:
boolean False as content is available to other tags by default. public

Reimplemented in SimpleOptionTag, and SimpleTextAreaTag.

Definition at line 59 of file tag.php.

SimpleTag ( name,
attributes 
)

Starts with a named tag with attributes only.

Parameters:
string$nameTag name.
hash$attributesAttribute names and string values. Note that the keys must have been converted to lower case.

Definition at line 34 of file tag.php.

Here is the caller graph for this function:


Field Documentation

$_attributes

Definition at line 23 of file tag.php.

$_content

Definition at line 24 of file tag.php.

$_name

Definition at line 22 of file tag.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations