Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Zend_Markup_Token Class Reference

Public Member Functions

 __construct ($tag, $type, $name= '', array $attributes=array(), Zend_Markup_Token $parent=null)
 Construct the token.
 
 setStopper ($stopper)
 Set the stopper.
 
 getStopper ()
 Get the stopper.
 
 getName ()
 Get the token's name.
 
 getType ()
 Get the token's type.
 
 getTag ()
 Get the complete tag.
 
 getAttribute ($name)
 Get an attribute.
 
 hasAttribute ($name)
 Check if the token has an attribute.
 
 getAttributes ()
 Get all the attributes.
 
 addAttribute ($name, $value)
 Add an attribute.
 
 attributeIsEmpty ($name)
 Check if an attribute is empty.
 
 addChild (Zend_Markup_Token $child)
 Add a child token.
 
 setChildren (Zend_Markup_TokenList $children)
 Set the children token list.
 
 getChildren ()
 Get the children for this token.
 
 hasChildren ()
 Does this token have any children.
 
 getParent ()
 Get the parent token (if any)
 
 setParent (Zend_Markup_Token $parent)
 Set a parent token.
 
 __clone ()
 Magic clone function.
 

Public Attributes

const TYPE_NONE = 'none'
 
const TYPE_TAG = 'tag'
 

Protected Attributes

 $_children
 
 $_tag
 
 $_type
 
 $_name = ''
 
 $_attributes = array()
 
 $_stopper = ''
 
 $_parent
 

Constructor & Destructor Documentation

__construct (   $tag,
  $type,
  $name = '',
array  $attributes = array(),
Zend_Markup_Token  $parent = null 
)

Construct the token.

Parameters
string$tag
string$type
string$name
array$attributes
Zend_Markup_Token$parent
Returns
void

Member Function Documentation

__clone ( )

Magic clone function.

Returns
void
addAttribute (   $name,
  $value 
)

Add an attribute.

Returns
Zend_Markup_Token
addChild ( Zend_Markup_Token  $child)

Add a child token.

Returns
void
attributeIsEmpty (   $name)

Check if an attribute is empty.

Parameters
string$name
Returns
bool
getAttribute (   $name)

Get an attribute.

Parameters
string$name
Returns
string
getAttributes ( )

Get all the attributes.

Returns
array
getChildren ( )

Get the children for this token.

Returns
Zend_Markup_TokenList
getName ( )

Get the token's name.

Returns
string
getParent ( )

Get the parent token (if any)

Returns
Zend_Markup_Token
getStopper ( )

Get the stopper.

Returns
string
getTag ( )

Get the complete tag.

Returns
string
getType ( )

Get the token's type.

Returns
string
hasAttribute (   $name)

Check if the token has an attribute.

Parameters
string$name
Returns
bool
hasChildren ( )

Does this token have any children.

Returns
bool
setChildren ( Zend_Markup_TokenList  $children)

Set the children token list.

Parameters
Zend_Markup_TokenList$children
Returns
Zend_Markup_Token
setParent ( Zend_Markup_Token  $parent)

Set a parent token.

Parameters
Zend_Markup_Token$parent
Returns
Zend_Markup_Token
setStopper (   $stopper)

Set the stopper.

Parameters
string$stopper
Returns
Zend_Markup_Token

Member Data Documentation

$_attributes = array()
protected
$_children
protected
$_name = ''
protected
$_parent
protected
$_stopper = ''
protected
$_tag
protected
$_type
protected
const TYPE_NONE = 'none'
const TYPE_TAG = 'tag'