Class parserXMLDocBookTag

(line 122)



Located in File: /phpDocumentor/

a standard XML DocBook Tag

This class is designed to represent all DocBook tags. It is intelligent enough to understand the <title> tag, and also the <refname> tag for as title for <refentry>

Class Variables

array $attributes
string $name

$attributes = array() (line 130)

Data type : array

Attributes from the XML tag

Format: array(attrname => attrvalue, attrname => attrvalue,...)

$name (line 135)

Data type : string

Name of the tag

Class Constants


Method Detail

parserXMLDocBookTag parserXMLDocBookTag (string $name)
void addAttribute (string $name, string|parserIdInlineTag $value)
void addCData (string $word)
string Convert (Converter &$c, [bool $postprocess = true])
void endCData ()
string getId (Converter &$c)
bool|string getSubsection (Converter &$c, string $subsection)
string getTitle (Converter &$c)
int getTOC ([false|integer $state = false])
boolean hasTitle ()
void setId (parserIdInlineTag $id)
void setTitle (parserXMLDocBookTag $title)
void setTOC (integer $state, parserTocInlineTag $val)
void startCData ()

Constructor parserXMLDocBookTag (line 165)

parserXMLDocBookTag parserXMLDocBookTag( string $name)

sets up the tag


  • string $name: tag name


  • todo - CS cleanup - rename to parserXmlDocBookTag for camelCase rule

Method add (line 443)

mixed add( parserEntity|parserCData|parserXMLDocBookTag|string $el)

Overrides : parserStringWithInlineTags::add() equivalent to the . operator ($a = $b . $c)

Add contents to this tag.

There are four kinds of data in a DocBook tutorial:

  1. tags - normal tags like <refentry>
  2. entities - normal entities like &rdquo;
  3. <![CDATA[ - character data that should not be interpreted, like <programlisting> contents
  4. text - normal non-markup text
All four kinds of data are added here



Method addAttribute (line 271)

void addAttribute( string $name, string|parserIdInlineTag $value)

Add an xml tag attribute name="value" pair

if the attribute is id, value must be a parserIdInlineTag



Method addCData (line 256)

void addCData( string $word)

add a word to CData


  • string $word: word to add


Method Convert (line 180)

string Convert( Converter &$c, [bool $postprocess = true])

Overrides : parserStringWithInlineTags::Convert() Use to convert the string to a real string with all inline tags parsed and linked

calls the output conversion


  • Converter &$c: the output converter
  • bool $postprocess: if postprocessing is needed


  • uses - Converter::TranslateTag() - Calls this to enclose the contents of the DocBook tag based on the values in template options.ini file

Method endCData (line 211)

void endCData( )

Adds $_cdata to $value


Method getId (line 323)

string getId( Converter &$c)

Return converter-specific formatting of ID.



Method getSubsection (line 401)

bool|string getSubsection( Converter &$c, string $subsection)

Retrieve the contents of a subsection

This method uses the $_id members of nested docbook tags to retrieve the section defined by $subsection


  • Converter &$c: the output converter
  • string $subsection: converter-specific subsection


Method getTitle (line 347)

string getTitle( Converter &$c)

Retrieve Converter-specific formatting of the title of this element



Method getTOC (line 228)

int getTOC( [false|integer $state = false])

Retrieve either the table of contents index, or the location that the TOC will go


  • false|integer $state: either an index of the {@toc} tag in $this->value or false, if the next index value of $this->value is needed


Method hasTitle (line 335)

boolean hasTitle( )

Determine whether the docbook element has a title


Method setId (line 309)

void setId( parserIdInlineTag $id)

If the id attribute is present, this method will set its id



Method setTitle (line 297)

void setTitle( parserXMLDocBookTag $title)

Set the title of a DocBook tag section.

For most DocBook tags, the title is represented with a <title></title> tag pair. The <refentry> top-level tag is a little different. Instead of using <title></title>, phpDocumentor uses the contents of the <refname> tag in the <refnamediv> tag



Method setTOC (line 244)

void setTOC( integer $state, parserTocInlineTag $val)

sets the TOC value



Method startCData (line 201)

void startCData( )

Begin a new CData section


Inherited Variables

Inherited Class Variable Summary

Inherited From Class parserStringWithInlineTags

parserStringWithInlineTags::$type - Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah'...

parserStringWithInlineTags::$value - array of strings and parserInlineTags

Inherited Methods

Inherited Method Summary

Inherited From Class parserStringWithInlineTags

parserStringWithInlineTags::add() - equivalent to the . operator ($a = $b . $c)

parserStringWithInlineTags::Convert() - Use to convert the string to a real string with all inline tags parsed and linked

parserStringWithInlineTags::getString() - return the string unconverted (all inline tags are taken out - this should only be used in pre-parsing to see if any other text is in the string)

parserStringWithInlineTags::hasInlineTag() - Determine whether the string contains any inline tags

parserStringWithInlineTags::setSource() - Pass source code to any {@source} tags contained within the string for later conversion.

parserStringWithInlineTags::trimmedStrlen() - equivalent to trim(strlen($string))

Inherited From Class parserBase

parserBase::getType() - gets the type

parserBase::getValue() - gets the value

parserBase::setValue() - sets the given value

Documentation generated on Mon, 05 Dec 2011 21:28:35 -0600 by phpDocumentor 1.4.4