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

Public Member Functions

 parse ($value)
 Prepare the parsing of a bbcode string, the real parsing is done in _parse().
 
 _createTree ()
 Parse the token array into a tree.
 

Public Attributes

const NEWLINE = "[newline\0]"
 
const TYPE_DEFAULT = 'default'
 
const TYPE_SINGLE = 'single'
 
const NAME_CHARSET = '^\[\]=\s'
 
const STATE_SCAN = 0
 
const STATE_SCANATTRS = 1
 
const STATE_PARSEVALUE = 2
 

Protected Member Functions

 _tokenize ()
 Tokenize.
 
 _checkTagDeclaration ($name)
 Check if there is a tag declaration, and if it isnt there, add it.
 
 _getType ($name)
 Check the tag's type.
 
 _isStopper ($tag)
 Check if the tag is a stopper.
 
 _addToSearchedStoppers (Zend_Markup_Token $token)
 Add to searched stoppers.
 
 _removeFromSearchedStoppers (Zend_Markup_Token $token)
 Remove from searched stoppers.
 

Protected Attributes

 $_tree
 
 $_current
 
 $_value = ''
 
 $_valueLen = 0
 
 $_pointer = 0
 
 $_buffer = ''
 
 $_temp
 
 $_searchedStoppers = array()
 
 $_tags
 
 $_tokens = array()
 
 $_state = self::STATE_SCAN
 

Member Function Documentation

_addToSearchedStoppers ( Zend_Markup_Token  $token)
protected

Add to searched stoppers.

Parameters
Zend_Markup_Token$token
Returns
void
_checkTagDeclaration (   $name)
protected

Check if there is a tag declaration, and if it isnt there, add it.

Parameters
string$name
Returns
void
_createTree ( )

Parse the token array into a tree.

Parameters
array$tokens
Returns
void
_getType (   $name)
protected

Check the tag's type.

Parameters
string$name
Returns
string
_isStopper (   $tag)
protected

Check if the tag is a stopper.

Parameters
string$tag
Returns
bool
_removeFromSearchedStoppers ( Zend_Markup_Token  $token)
protected

Remove from searched stoppers.

Parameters
Zend_Markup_Token$token
Returns
void
_tokenize ( )
protected

Tokenize.

Parameters
string$input
Returns
void
parse (   $value)

Prepare the parsing of a bbcode string, the real parsing is done in _parse().

Parameters
string$value
Returns
Zend_Markup_TokenList
See Also
Zend_Markup_Parser_Exception
Zend_Markup_Parser_Exception

Implements Zend_Markup_Parser_ParserInterface.

Member Data Documentation

$_buffer = ''
protected
$_current
protected
$_pointer = 0
protected
$_searchedStoppers = array()
protected
$_state = self::STATE_SCAN
protected
$_tags
protected
Initial value:
= array(
'Zend_Markup_Root' => array(
'type' => self::TYPE_DEFAULT,
'stoppers' => array(),
),
'*' => array(
'type' => self::TYPE_DEFAULT,
'stoppers' => array(self::NEWLINE, '[/*]', '[/]'),
),
'hr' => array(
'type' => self::TYPE_SINGLE,
'stoppers' => array(),
),
'code' => array(
'type' => self::TYPE_DEFAULT,
'stoppers' => array('[/code]', '[/]'),
'parse_inside' => false
)
)
$_temp
protected
$_tokens = array()
protected
$_tree
protected
$_value = ''
protected
$_valueLen = 0
protected
const NAME_CHARSET = '^\[\]=\s'
const NEWLINE = "[newline\0]"
const STATE_PARSEVALUE = 2
const STATE_SCAN = 0
const STATE_SCANATTRS = 1
const TYPE_DEFAULT = 'default'
const TYPE_SINGLE = 'single'