Class parserXMLDocBookTag

Description

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>

Located in /phpDocumentor/PackagePageElements.inc (line 122)

parserBase
   |
   --parserStringWithInlineTags
      |
      --parserXMLDocBookTag
Variable Summary
array $attributes
string $name
Method Summary
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 ()
Variables
array $attributes = array() (line 130)

Attributes from the XML tag

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

string $name (line 135)

Name of the tag

Inherited Variables

Inherited from parserStringWithInlineTags

parserStringWithInlineTags::$type
parserStringWithInlineTags::$value
Methods
Constructor parserXMLDocBookTag (line 165)

sets up the tag

  • todo: CS cleanup - rename to parserXmlDocBookTag for camelCase rule
parserXMLDocBookTag parserXMLDocBookTag (string $name)
  • string $name: tag name
add (line 443)

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

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

Redefinition of:
parserStringWithInlineTags::add()
equivalent to the . operator ($a = $b . $c)
addAttribute (line 271)

Add an xml tag attribute name="value" pair

if the attribute is id, value must be a parserIdInlineTag

void addAttribute (string $name, string|parserIdInlineTag $value)
addCData (line 256)

add a word to CData

void addCData (string $word)
  • string $word: word to add
Convert (line 180)

calls the output conversion

  • uses: Converter::TranslateTag() - Calls this to enclose the contents of the DocBook tag based on the values in template options.ini file
string Convert (Converter &$c, [bool $postprocess = true])
  • Converter &$c: the output converter
  • bool $postprocess: if postprocessing is needed

Redefinition of:
parserStringWithInlineTags::Convert()
Use to convert the string to a real string with all inline tags parsed and linked
endCData (line 211)

Adds $_cdata to $value

void endCData ()
getId (line 323)

Return converter-specific formatting of ID.

Passes $c to parserIdInlineTag::Convert()

string getId (Converter &$c)
getSubsection (line 401)

Retrieve the contents of a subsection

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

bool|string getSubsection (Converter &$c, string $subsection)
  • Converter &$c: the output converter
  • string $subsection: converter-specific subsection
getTitle (line 347)

Retrieve Converter-specific formatting of the title of this element

string getTitle (Converter &$c)
getTOC (line 228)

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

int getTOC ([false|integer $state = false])
  • 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
hasTitle (line 335)

Determine whether the docbook element has a title

boolean hasTitle ()
setId (line 309)

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

void setId (parserIdInlineTag $id)
setTitle (line 297)

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

void setTitle (parserXMLDocBookTag $title)
setTOC (line 244)

sets the TOC value

void setTOC (integer $state, parserTocInlineTag $val)
startCData (line 201)

Begin a new CData section

void startCData ()

Inherited Methods

Inherited From parserStringWithInlineTags

parserStringWithInlineTags::add()
parserStringWithInlineTags::Convert()
parserStringWithInlineTags::getString()
parserStringWithInlineTags::hasInlineTag()
parserStringWithInlineTags::setSource()
parserStringWithInlineTags::trimmedStrlen()

Inherited From parserBase

parserBase::getType()
parserBase::getValue()
parserBase::setValue()

Documentation generated on Mon, 05 Dec 2011 21:23:01 -0600 by phpDocumentor 1.4.4