Markup/Token.php

Show: PublicProtectedPrivateinherited
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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Markup  
Subpackage
Parser  
Version
$Id$  

\Zend_Markup_Token

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

Constants

>VConstant  TYPE_NONE = 'none'
>VConstant  TYPE_TAG = 'tag'

Properties

>VPropertyprotectedarray $_attributes = array()
Tag attributes
Default valuearray()Details
Type
array
>VPropertyprotected\Zend_Markup_TokenList $_children
Children of this token
>VPropertyprotectedstring $_name = ''
Tag name
Default value''Details
Type
string
>VPropertyprotected\Zend_Markup_Token $_parent
The parent token
>VPropertyprotectedstring $_stopper = ''
The used tag stopper (empty when none is found)
Default value''Details
Type
string
>VPropertyprotectedstring $_tag
The complete tag
Details
Type
string
>VPropertyprotectedstring $_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
NameTypeDescription
$tagstring
$typestring
$namestring
$attributesarray
$parent\Zend_Markup_Token
methodpublicaddAttribute( $name,  $value) : \Zend_Markup_Token

Add an attribute

Parameters
NameTypeDescription
$name
$value
Returns
TypeDescription
\Zend_Markup_Token
methodpublicaddChild( $child) : void

Add a child token

Parameters
NameTypeDescription
$child
methodpublicattributeIsEmpty(string $name) : bool

Check if an attribute is empty

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
bool
methodpublicgetAttribute(string $name) : string

Get an attribute

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
string
methodpublicgetAttributes() : array

Get all the attributes

Returns
TypeDescription
array
methodpublicgetChildren() : \Zend_Markup_TokenList

Get the children for this token

Returns
TypeDescription
\Zend_Markup_TokenList
methodpublicgetName() : string

Get the token's name

Returns
TypeDescription
string
methodpublicgetParent() : \Zend_Markup_Token

Get the parent token (if any)

Returns
TypeDescription
\Zend_Markup_Token
methodpublicgetStopper() : string

Get the stopper

Returns
TypeDescription
string
methodpublicgetTag() : string

Get the complete tag

Returns
TypeDescription
string
methodpublicgetType() : string

Get the token's type

Returns
TypeDescription
string
methodpublichasAttribute(string $name) : bool

Check if the token has an attribute

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
bool
methodpublichasChildren() : bool

Does this token have any children

Returns
TypeDescription
bool
methodpublicsetChildren(\Zend_Markup_TokenList $children) : \Zend_Markup_Token

Set the children token list

Parameters
NameTypeDescription
$children\Zend_Markup_TokenList
Returns
TypeDescription
\Zend_Markup_Token
methodpublicsetParent(\Zend_Markup_Token $parent) : \Zend_Markup_Token

Set a parent token

Parameters
NameTypeDescription
$parent\Zend_Markup_Token
Returns
TypeDescription
\Zend_Markup_Token
methodpublicsetStopper(string $stopper) : \Zend_Markup_Token

Set the stopper

Parameters
NameTypeDescription
$stopperstring
Returns
TypeDescription
\Zend_Markup_Token
Documentation was generated by phpDocumentor 2.2.0 .