API Documentation

Zend/Markup/Token.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Markup  
Subpackage
Parser  
Version
$Id: Token.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Markup_Token

Package: Zend\Markup

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  TYPE_NONE = 'none'
Constant  TYPE_TAG = 'tag'

Properties

Propertyprotectedarray  $_attributes= 'array()'

Tag attributes

Default valuearray()Details
Type
array
Propertyprotected\Zend_Markup_TokenList  $_children= ''

Children of this token

Details
Type
\Zend_Markup_TokenList
Propertyprotectedstring  $_name= ''''

Tag name

Default value''Details
Type
string
Propertyprotected\Zend_Markup_Token  $_parent= ''

The parent token

Details
Type
\Zend_Markup_Token
Propertyprotectedstring  $_stopper= ''''

The used tag stopper (empty when none is found)

Default value''Details
Type
string
Propertyprotectedstring  $_tag= ''

The complete tag

Details
Type
string
Propertyprotectedstring  $_type= ''

The tag's type

Details
Type
string

Methods

methodpublic__clone( ) : void

Magic clone function

methodpublic__construct( string $tag, string $type, string $name = '', array $attributes = array(), \Zend_Markup_Token $parent = null ) : void

Construct the token

Parameters
Name Type Description
$tag string
$type string
$name string
$attributes array
$parent \Zend_Markup_Token
methodpublicaddAttribute(  $name,  $value ) : \Zend_Markup_Token

Add an attribute

Parameters
Name Type Description
$name
$value
Returns
Type Description
\Zend_Markup_Token
methodpublicaddChild(  $child ) : void

Add a child token

Parameters
Name Type Description
$child
methodpublicattributeIsEmpty( string $name ) : bool

Check if an attribute is empty

Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublicgetAttribute( string $name ) : string

Get an attribute

Parameters
Name Type Description
$name string
Returns
Type Description
string
methodpublicgetAttributes( ) : array

Get all the attributes

Returns
Type Description
array
methodpublicgetChildren( ) : \Zend_Markup_TokenList

Get the children for this token

Returns
Type Description
\Zend_Markup_TokenList
methodpublicgetName( ) : string

Get the token's name

Returns
Type Description
string
methodpublicgetParent( ) : \Zend_Markup_Token

Get the parent token (if any)

Returns
Type Description
\Zend_Markup_Token
methodpublicgetStopper( ) : string

Get the stopper

Returns
Type Description
string
methodpublicgetTag( ) : string

Get the complete tag

Returns
Type Description
string
methodpublicgetType( ) : string

Get the token's type

Returns
Type Description
string
methodpublichasAttribute( string $name ) : bool

Check if the token has an attribute

Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublichasChildren( ) : bool

Does this token have any children

Returns
Type Description
bool
methodpublicsetChildren( \Zend_Markup_TokenList $children ) : \Zend_Markup_Token

Set the children token list

Parameters
Name Type Description
$children \Zend_Markup_TokenList
Returns
Type Description
\Zend_Markup_Token
methodpublicsetParent( \Zend_Markup_Token $parent ) : \Zend_Markup_Token

Set a parent token

Parameters
Name Type Description
$parent \Zend_Markup_Token
Returns
Type Description
\Zend_Markup_Token
methodpublicsetStopper( string $stopper ) : \Zend_Markup_Token

Set the stopper

Parameters
Name Type Description
$stopper string
Returns
Type Description
\Zend_Markup_Token
Documentation was generated by DocBlox 0.15.1.