Markup/Token.php
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 [email protected] 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
Properties
string $_stopper = ''
The used tag stopper (empty when none is found)
Default value
''
Details- Type
- string
Methods
__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 |
addAttribute( $name, $value) : \Zend_Markup_Token
Add an attribute
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | ||
$value |
Type | Description |
---|---|
\Zend_Markup_Token |
attributeIsEmpty(string $name) : bool
Check if an attribute is empty
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
bool |
getAttribute(string $name) : string
Get an attribute
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
string |
getChildren() : \Zend_Markup_TokenList
Get the children for this token
Returns
Type | Description |
---|---|
\Zend_Markup_TokenList |
getParent() : \Zend_Markup_Token
Get the parent token (if any)
Returns
Type | Description |
---|---|
\Zend_Markup_Token |
hasAttribute(string $name) : bool
Check if the token has an attribute
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
bool |
setChildren(\Zend_Markup_TokenList $children) : \Zend_Markup_Token
Set the children token list
Parameters
Returns
Name | Type | Description |
---|---|---|
$children | \Zend_Markup_TokenList |
Type | Description |
---|---|
\Zend_Markup_Token |
setParent(\Zend_Markup_Token $parent) : \Zend_Markup_Token
Set a parent token
Parameters
Returns
Name | Type | Description |
---|---|---|
$parent | \Zend_Markup_Token |
Type | Description |
---|---|
\Zend_Markup_Token |
setStopper(string $stopper) : \Zend_Markup_Token
Set the stopper
Parameters
Returns
Name | Type | Description |
---|---|---|
$stopper | string |
Type | Description |
---|---|
\Zend_Markup_Token |