Class: Converter

Source Location: /PEAR/PhpDocumentor/phpDocumentor/Converter.inc

Class Overview [line 74]


Base class for all output converters.

Author(s):

Version:

  • $Id: Converter.inc,v 1.39 2007/12/19 02:16:49 ashnazg Exp $

Copyright:

Variables

Constants

Methods


Child classes:

CHMdefaultConverter
Generates files that MS HTML Help Worshop can use to create a MS Windows compiled help file (CHM)
XMLDocBookpeardoc2Converter
XML DocBook converter.
XMLDocBookConverter
XML DocBook converter.
HTMLSmartyConverter
HTML output converter.
HTMLframesConverter
HTML output converter.
PDFdefaultConverter
PDF output converter.

Inherited Variables

Inherited Constants

Inherited Methods



Class Details

Base class for all output converters.

The Converter marks the final stage in phpDocumentor. phpDocumentor works in this order:

Parsing => Intermediate Parsing organization => Conversion to output

A Converter takes output from the phpDocumentor_IntermediateParser and converts it to output. With version 1.2, phpDocumentor includes a variety of output converters:

{@ and using walk() or walk_everything (depending on the value of $sort_absolutely_everything) it "walks" over an array of phpDocumentor elements.}}

Tags:

[ Top ]


Class Variables

$all_packages

[line 366]

All packages encountered in parsing

Tags:

Type: array

Overrides:

[ Top ]

$class =  false

[line 105]

set to a classname if currently parsing a class, false if not

Type: string|false

Overrides:

[ Top ]

$classes

[line 319]

All class information, organized by path, and by package

Type: Classes

Overrides:

[ Top ]

$class_contents = array()

[line 269]

alphabetical index of all methods and vars in a class by package/subpackage

The class itself has a link under ###main

Tags:

Type: array

Overrides:

[ Top ]

$class_data

[line 165]

template for the class currently being processed

Type: Smarty

Overrides:

[ Top ]

$class_elements = array()

[line 208]

alphabetized index of classes by package

Tags:

Type: array

Overrides:

[ Top ]

$curfile

[line 313]

full path of the current file being converted

Type: mixed

Overrides:

[ Top ]

$curpage

[line 171]

current procedural page being processed

Type: parserPage

Overrides:

[ Top ]

$define_elements = array()

[line 201]

alphabetized index of defines by package

Tags:

Type: array

Overrides:

[ Top ]

$elements = array()

[line 187]

alphabetical index of all elements

Tags:

Type: array

Overrides:

[ Top ]

$function_elements = array()

[line 222]

alphabetized index of functions by package

Tags:

Type: array

Overrides:

[ Top ]

$global_elements = array()

[line 215]

alphabetized index of global variables by package

Tags:

Type: array

Overrides:

[ Top ]

$highlightingSource =  false

[line 325]

Flag used to help converters determine whether to do special source highlighting

Type: boolean

Overrides:

[ Top ]

$leftindex = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => true, 'globals' => true)

[line 384]

Controls which of the one-element-only indexes are generated.

Generation of these indexes for large packages is time-consuming. This is an optimization feature. An example of how to use this is in HTMLframesConverter::$leftindex, and in HTMLframesConverter::formatLeftIndex(). These indexes are intended for use as navigational aids through documentation, but can be used for anything by converters.

Tags:

Type: array

Overrides:

[ Top ]

$outputformat =  'Generic'

[line 90]

output format of this converter

in Child converters, this will match the first part of the -o command-line as in -o HTML:frames:default "HTML"

Tags:

Type: string

Overrides:

[ Top ]

$package =  'default'

[line 95]

package name currently being converted

Type: string

Overrides:

[ Top ]

$packagecategories

[line 359]

Packages associated with categories

Used by the XML:DocBook/peardoc2 converter, and available to others, to group many packages into categories

Tags:

Type: array

Overrides:

[ Top ]

$package_elements = array()

[line 180]

alphabetical index of all elements sorted by package, subpackage, page, and class.

Tags:

  • var - Format: array(package => array(subpackage => array('page'|'class' => array(path|classname => array(element, element,...)))))
  • uses - Converter::$sort_absolutely_everything - if true, then $package_elements is used, otherwise, the ParserData::$classelements and ParserData::$pageelements variables are used

Type: array

Overrides:

[ Top ]

$package_output

[line 141]

set to value of -po commandline

Tags:

Type: mixed

Overrides:

[ Top ]

$package_parents

[line 349]

Hierarchy of packages

Every package that contains classes may have parent or child classes in other packages. In other words, this code is legal:

  1.  

In this case, package one is a parent of package two

Tags:

Type: array

Overrides:

[ Top ]

$page

[line 147]

name of current page being converted

Type: string

Overrides:

[ Top ]

$page_contents = array()

[line 238]

alphabetical index of all elements on a page by package/subpackage

The page itself has a link under ###main

Tags:

Type: array

Overrides:

[ Top ]

$page_data

[line 159]

template for the procedural page currently being processed

Type: Smarty

Overrides:

[ Top ]

$page_elements = array()

[line 194]

alphabetized index of procedural pages by package

Tags:

Type: array

Overrides:

[ Top ]

$parseprivate

[line 276]

controls processing of elements marked private with @access private

defaults to false. Set with command-line --parseprivate or -pp

Type: bool

Overrides:

[ Top ]

$path

[line 153]

path of current page being converted

Type: string

Overrides:

[ Top ]

$pkg_elements = array()

[line 229]

alphabetical index of all elements, indexed by package/subpackage

Tags:

Type: array

Overrides:

[ Top ]

$processSpecialRoots =  false

[line 81]

This converter knows about the new root tree processing

In order to fix PEAR Bug #6389

Type: boolean

Overrides:

[ Top ]

$quietmode

[line 283]

controls display of progress information while parsing.

defaults to false. Set to true for cron jobs or other situations where no visual output is necessary

Type: bool

Overrides:

[ Top ]

$smarty_dir =  ''

[line 301]

Directory that the smarty templates are in

Type: string

Overrides:

[ Top ]

$sort_absolutely_everything =  false

[line 251]

This is used if the content must be passed in the order it should be read, i.e. by package, procedural then classes

This fixes bug 637921, and is used by PDFdefaultConverter

Tags:

  • usedby - Converter::$package_elements - if true, then $package_elements is used, otherwise, the ParserData::$classelements and ParserData::$pageelements variables are used

Type: mixed

Overrides:

[ Top ]

$sort_page_contents_by_type =  false

[line 245]

This determines whether the $page_contents array should be sorted by element type as well as alphabetically by name

Tags:

Type: boolean

Overrides:

[ Top ]

$sourcePaths = array()

[line 372]

A list of files that have had source code generated

Type: array

Overrides:

[ Top ]

$subpackage =  ''

[line 100]

subpackage name currently being converted

Type: string

Overrides:

[ Top ]

$targetDir =  ''

[line 289]

directory that output is sent to. -t command-line sets this.

Tags:

Type: mixed

Overrides:

[ Top ]

$templateDir =  ''

[line 295]

Directory that the template is in, relative to phpDocumentor root directory

Type: string

Overrides:

[ Top ]

$templateName =  ''

[line 308]

Name of the template, from last part of -o

Tags:

Type: string

Overrides:

[ Top ]

$template_options

[line 399]

Options for each template, parsed from the options.ini file in the template base directory

Tags:

Type: array

Overrides:

[ Top ]

$title =  'Generated Documentation'

[line 392]

Tags:

Type: string

Overrides:

[ Top ]

$todoList = array()

[line 429]

List of all @todo tags and a link to the element with the @todo

Format: array(package => array(link to element, array(todo parserTag,...)),...)

Tags:

Type: array

Overrides:

[ Top ]


Class Methods

Converter

Converter Converter( array &$allp, array &$packp, Classes &$classes, ProceduralPages &$procpages, array $po, boolean $pp, boolean $qm, string $targetDir, string $template, string $title)

[line 452]

Initialize Converter data structures

Parameters:

[ Top ]

AttrToString

string AttrToString( string $tag, attribute $attr, [boolean $unmodified = false])

[line 1307]

Convert the attribute of a Tutorial docbook tag's attribute list

to a string based on the template options.ini

Parameters:

  • string $tag - tag name
  • attribute $attr - array
  • boolean $unmodified - if true, returns attrname="value"...

[ Top ]

Bolden

string Bolden( string $para)

[line 931]

Used to convert the contents of <b> in a docblock

Tags:

Parameters:

  • string $para -

[ Top ]

Br

string Br( string $para)

[line 1001]

Used to convert <br> in a docblock

Tags:

Overridden in child classes as:

XMLDocBookpeardoc2Converter::Br()

Parameters:

  • string $para -

[ Top ]

checkState

void checkState( mixed $state)

[line 5362]

Compare parserStringWithInlineTags::Convert() cache state to $state

Tags:

Parameters:

  • mixed $state -

[ Top ]

cleanup

void cleanup( )

[line 5073]

Finish up parsing/cleanup directories

Parameters:

[ Top ]

Convert

void Convert( mixed &$element)

[line 3978]

Convert all elements to output format

This will call ConvertXxx where Xxx is http://www.php.net/ucfirst($element->type). It is expected that a child converter defines a handler for every element type, even if that handler does nothing. phpDocumentor will terminate with an error if a handler doesn't exist.

Tags:

  • throws - PDERROR_NO_CONVERT_HANDLER

Parameters:

[ Top ]

convertClass

void convertClass( &$element)

[line 4042]

Default Class Handler

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template. Sets up the class template. {@, getFormattedConflicts, getFormattedInheritedMethods, and getFormattedInheritedVars are called to complete vital template setup.}}

Overridden in child classes as:

CHMdefaultConverter::convertClass()
Converts class for template output
XMLDocBookpeardoc2Converter::convertClass()
Converts class for template output
XMLDocBookConverter::convertClass()
Converts class for template output
HTMLSmartyConverter::convertClass()
Converts class for template output
HTMLframesConverter::convertClass()
Converts class for template output
PDFdefaultConverter::convertClass()

Parameters:

  • &$element -

[ Top ]

convertConst

void convertConst( parserConst &$element, [ $additions = array()])

[line 4213]

Converts class constants for template output.

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template.

This function must be called by a child converter with any extra template variables needed in the parameter $addition

Overridden in child classes as:

CHMdefaultConverter::convertConst()
Converts class constants for template output
HTMLSmartyConverter::convertConst()
Converts class variables for template output
HTMLframesConverter::convertConst()
Converts class variables for template output
PDFdefaultConverter::convertConst()

Parameters:

[ Top ]

convertDefine

void convertDefine( parserDefine &$element, [array $addition = array()])

[line 4330]

Converts defines for template output

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition {@, this method also uses utility functions getGlobalValue(), getFormattedConflicts()}}

Tags:

Overridden in child classes as:

CHMdefaultConverter::convertDefine()
Converts defines for template output
XMLDocBookpeardoc2Converter::convertDefine()
Converts defines for template output
XMLDocBookConverter::convertDefine()
Converts defines for template output
HTMLSmartyConverter::convertDefine()
Converts defines for template output
HTMLframesConverter::convertDefine()
Converts defines for template output
PDFdefaultConverter::convertDefine()

Parameters:

  • parserDefine &$element -
  • array $addition - any additional template variables should be in this array

[ Top ]

ConvertErrorLog

void ConvertErrorLog( )

[line 2422]

Convert the phpDocumentor parsing/conversion error log

Tags:

  • abstract -

Overridden in child classes as:

CHMdefaultConverter::ConvertErrorLog()
Create errors.html template file output
XMLDocBookpeardoc2Converter::ConvertErrorLog()
Create errors.html template file output
XMLDocBookConverter::ConvertErrorLog()
Create errors.html template file output
HTMLSmartyConverter::ConvertErrorLog()
Create errors.html template file output
HTMLframesConverter::ConvertErrorLog()
Create errors.html template file output

Parameters:

[ Top ]

convertFunction

void convertFunction( parserFunction &$element, [ $addition = array()])

[line 4387]

Converts function for template output

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition

Tags:

Overridden in child classes as:

CHMdefaultConverter::convertFunction()
Converts function for template output
XMLDocBookpeardoc2Converter::convertFunction()
Converts function for template output - does nothing in peardoc2!
XMLDocBookConverter::convertFunction()
Converts function for template output
HTMLSmartyConverter::convertFunction()
Converts function for template output
HTMLframesConverter::convertFunction()
Converts function for template output
PDFdefaultConverter::convertFunction()

Parameters:

[ Top ]

convertGlobal

void convertGlobal( parserGlobal &$element, [array $addition = array()])

[line 4296]

Converts global variables for template output

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition {@, this method also uses utility functions getGlobalValue(), getFormattedConflicts()}}

Tags:

Overridden in child classes as:

CHMdefaultConverter::convertGlobal()
Converts global variables for template output
XMLDocBookpeardoc2Converter::convertGlobal()
Converts global variables for template output
XMLDocBookConverter::convertGlobal()
Converts global variables for template output
HTMLSmartyConverter::convertGlobal()
Converts global variables for template output
HTMLframesConverter::convertGlobal()
Converts global variables for template output
PDFdefaultConverter::convertGlobal()

Parameters:

  • parserGlobal &$element -
  • array $addition - any additional template variables should be in this array

[ Top ]

convertInclude

void convertInclude( parserInclude &$element, [ $addition = array()])

[line 4359]

Converts includes for template output

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition

Tags:

Overridden in child classes as:

CHMdefaultConverter::convertInclude()
Converts include elements for template output
XMLDocBookpeardoc2Converter::convertInclude()
Converts include elements for template output
XMLDocBookConverter::convertInclude()
Converts include elements for template output
HTMLSmartyConverter::convertInclude()
Converts include elements for template output
HTMLframesConverter::convertInclude()
Converts include elements for template output
PDFdefaultConverter::convertInclude()

Parameters:

[ Top ]

convertMethod

void convertMethod( parserMethod &$element, [ $additions = array()])

[line 4109]

Converts method for template output

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition

Overridden in child classes as:

CHMdefaultConverter::convertMethod()
Converts class methods for template output
XMLDocBookpeardoc2Converter::convertMethod()
Converts method for template output
XMLDocBookConverter::convertMethod()
Converts method for template output
HTMLSmartyConverter::convertMethod()
Converts class methods for template output
HTMLframesConverter::convertMethod()
Converts class methods for template output
PDFdefaultConverter::convertMethod()

Parameters:

[ Top ]

convertPage

void convertPage( parserPage &$element)

[line 4250]

Default Page Handler

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template. {@, this class uses getSourceLocation() and getClassesOnPage() to set template variables. Also used is getPageName(), to get a Converter-specific name for the page.}}

Overridden in child classes as:

CHMdefaultConverter::convertPage()
converts procedural pages for template output
XMLDocBookpeardoc2Converter::convertPage()
converts procedural pages for template output
XMLDocBookConverter::convertPage()
converts procedural pages for template output
HTMLSmartyConverter::convertPage()
converts procedural pages for template output
HTMLframesConverter::convertPage()
converts procedural pages for template output
PDFdefaultConverter::convertPage()

Parameters:

[ Top ]

ConvertTitle

string ConvertTitle( string $tag, array $attr, string $title, string $cdata)

[line 1396]

Convert the title of a Tutorial docbook tag section

to a string based on the template options.ini

Parameters:

  • string $tag - tag name
  • array $attr -
  • string $title - title text
  • string $cdata -

[ Top ]

ConvertTodoList

void ConvertTodoList( )

[line 2430]

Convert the list of all @todo tags

Tags:

  • abstract -

Overridden in child classes as:

CHMdefaultConverter::ConvertTodoList()
HTMLSmartyConverter::ConvertTodoList()
HTMLframesConverter::ConvertTodoList()

Parameters:

[ Top ]

convertTutorial

void &convertTutorial( parserTutorial &$element)

[line 4006]

Default Tutorial Handler

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template. Sets up the tutorial template, and its prev/next/parent links {@ and uses the parserTutorial::prev, parserTutorial::next, parserTutorial::parent links to set up those links.}}

Overridden in child classes as:

CHMdefaultConverter::convertTutorial()
XMLDocBookpeardoc2Converter::convertTutorial()
Convert tutorials for output
XMLDocBookConverter::convertTutorial()
HTMLSmartyConverter::convertTutorial()
HTMLframesConverter::convertTutorial()
PDFdefaultConverter::convertTutorial()

Parameters:

[ Top ]

convertVar

void convertVar( parserVar &$element, [ $additions = array()])

[line 4169]

Converts class variables for template output.

Conversion Handlers

All of the convert* handlers set up template variables for the Smarty template.

This function must be called by a child converter with any extra template variables needed in the parameter $addition

Overridden in child classes as:

CHMdefaultConverter::convertVar()
Converts class variables for template output
XMLDocBookpeardoc2Converter::convertVar()
Does nothing in this converter
XMLDocBookConverter::convertVar()
Converts class variables for template output.
HTMLSmartyConverter::convertVar()
Converts class variables for template output
HTMLframesConverter::convertVar()
Converts class variables for template output
PDFdefaultConverter::convertVar()

Parameters:

[ Top ]

Convert_RIC

void Convert_RIC( README|INSTALL|CHANGELOG $name, string $contents)

[line 3958]

Convert README/INSTALL/CHANGELOG file contents to output format

Tags:

  • abstract -

Overridden in child classes as:

CHMdefaultConverter::Convert_RIC()
Convert README/INSTALL/CHANGELOG file contents to output format
HTMLSmartyConverter::Convert_RIC()
Convert README/INSTALL/CHANGELOG file contents to output format
HTMLframesConverter::Convert_RIC()
Convert README/INSTALL/CHANGELOG file contents to output format
PDFdefaultConverter::Convert_RIC()
Convert README/INSTALL/CHANGELOG file contents to output format

Parameters:

  • README|INSTALL|CHANGELOG $name -
  • string $contents - contents of the file

[ Top ]

copyFile

void copyFile( string $file, [ $subdir = ''])

[line 5337]

Copies a file from the template directory to the target directory

thanks to Robert Hoffmann for this fix

Parameters:

  • string $file -
  • $subdir -

[ Top ]

createParentDir

void createParentDir( string $dir)

[line 5253]

Recursively creates all subdirectories that don't exist in the $dir path

Parameters:

  • string $dir -

[ Top ]

EncloseList

string EncloseList( string $list, $ordered)

[line 888]

Used to convert the contents of <ol> or <ul> in a docblock

Tags:

Parameters:

  • string $list -
  • $ordered -

[ Top ]

EncloseParagraph

string EncloseParagraph( string $para)

[line 917]

Used to enclose a paragraph in a docblock

Parameters:

  • string $para -

[ Top ]

endClass

void endClass( )

[line 507]

Called by walk() while converting, when the last class element has been parsed.

A Converter can use this method in any way it pleases. HTMLframesConverter uses it to complete the template for the class and to output its documentation

Tags:

Overridden in child classes as:

CHMdefaultConverter::endClass()
Writes out the template file of $class_data and unsets the template to save memory
XMLDocBookpeardoc2Converter::endClass()
Writes out the template file of $class_data and unsets the template to save memory
XMLDocBookConverter::endClass()
Writes out the template file of $class_data and unsets the template to save memory
HTMLSmartyConverter::endClass()
Writes out the template file of $class_data and unsets the template to save memory
HTMLframesConverter::endClass()
Writes out the template file of $class_data and unsets the template to save memory

Parameters:

[ Top ]

endPage

void endPage( )

[line 521]

Called by walk() while converting, when the last procedural page element has been parsed.

A Converter can use this method in any way it pleases. HTMLframesConverter uses it to complete the template for the procedural page and to output its documentation

Tags:

Overridden in child classes as:

CHMdefaultConverter::endPage()
Writes out the template file of $page_data and unsets the template to save memory
XMLDocBookConverter::endPage()
Writes out the template file of $page_data and unsets the template to save memory
HTMLSmartyConverter::endPage()
Writes out the template file of $page_data and unsets the template to save memory
HTMLframesConverter::endPage()
Writes out the template file of $page_data and unsets the template to save memory

Parameters:

[ Top ]

exampleProgramExample

string exampleProgramExample( string $example, [boolean $tutorial = false], [ $inlinesourceparse = null], [ $class = null], [ $linenum = null], [ $filesourcepath = null])

[line 773]

Used to convert the {@example} inline tag in a docblock.

By default, this just wraps ProgramExample

Tags:

  • see - XMLDocBookpeardoc2Converter::exampleProgramExample

Overridden in child classes as:

XMLDocBookpeardoc2Converter::exampleProgramExample()
Used to convert the {@example} inline tag in a docblock.

Parameters:

  • string $example -
  • boolean $tutorial - true if this is to highlight a tutorial <programlisting>
  • $inlinesourceparse -
  • $class -
  • $linenum -
  • $filesourcepath -

[ Top ]

flushHighlightCache

string flushHighlightCache( )

[line 609]

Return the close text for the current token

Parameters:

[ Top ]

formatIndex

void formatIndex( )

[line 545]

Called by walk() while converting.

This method is intended to be the place that $elements is formatted for output.

Tags:

Overridden in child classes as:

CHMdefaultConverter::formatIndex()
CHMdefaultConverter uses this function to format template index.html and packages.html
XMLDocBookpeardoc2Converter::formatIndex()
Does nothing
XMLDocBookConverter::formatIndex()
HTMLdefaultConverter uses this function to format template index.html and packages.html
HTMLSmartyConverter::formatIndex()
HTMLdefaultConverter uses this function to format template index.html and packages.html
HTMLframesConverter::formatIndex()
HTMLdefaultConverter uses this function to format template index.html and packages.html

Parameters:

[ Top ]

formatLeftIndex

void formatLeftIndex( )

[line 559]

Called by walk() while converting.

This method is intended to be the place that any of $class_elements, $function_elements, $page_elements, $define_elements, and $global_elements is formatted for output, depending on the value of $leftindex

Tags:

Overridden in child classes as:

CHMdefaultConverter::formatLeftIndex()
Generate indexes for li_package.html and classtree output files
XMLDocBookpeardoc2Converter::formatLeftIndex()
Creates package/lang/categoryname/packagename.xml for each package
XMLDocBookConverter::formatLeftIndex()
Generate indexes for li_package.html and classtree output files
HTMLSmartyConverter::formatLeftIndex()
Generate indexes for li_package.html and classtree output files
HTMLframesConverter::formatLeftIndex()
Generate indexes for li_package.html and classtree output files

Parameters:

[ Top ]

formatPkgIndex

void formatPkgIndex( )

[line 533]

Called by walk() while converting.

This method is intended to be the place that $pkg_elements is formatted for output.

Tags:

Overridden in child classes as:

CHMdefaultConverter::formatPkgIndex()
CHMdefaultConverter chooses to format both package indexes and the complete index here
XMLDocBookpeardoc2Converter::formatPkgIndex()
Does nothing
XMLDocBookConverter::formatPkgIndex()
HTMLdefaultConverter chooses to format both package indexes and the complete index here
HTMLSmartyConverter::formatPkgIndex()
HTMLdefaultConverter chooses to format both package indexes and the complete index here
HTMLframesConverter::formatPkgIndex()
HTMLdefaultConverter chooses to format both package indexes and the complete index here

Parameters:

[ Top ]

formatTutorialTOC

string formatTutorialTOC( array $toc)

[line 1030]

Creates a table of contents for a {@toc} inline tag in a tutorial

This function should return a formatted table of contents. By default, it does nothing, it is up to the converter to format the TOC

Tags:

  • return - table of contents formatted for use in the current output format
  • abstract -
  • usedby - parserTocInlineTag::Convert() - passes an array of format:

Overridden in child classes as:

CHMdefaultConverter::formatTutorialTOC()
Use the template tutorial_toc.tpl to generate a table of contents for HTML
HTMLSmartyConverter::formatTutorialTOC()
Use the template tutorial_toc.tpl to generate a table of contents for HTML
HTMLframesConverter::formatTutorialTOC()
Use the template tutorial_toc.tpl to generate a table of contents for HTML

Parameters:

  • array $toc - format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...)

[ Top ]

generateChildClassList

void generateChildClassList( parserClass $class)

[line 4790]

returns a list of child classes

Tags:

Overridden in child classes as:

XMLDocBookpeardoc2Converter::generateChildClassList()
returns a list of child classes

Parameters:

[ Top ]

generateFormattedClassTree

string generateFormattedClassTree( parserClass $class)

[line 4637]

returns an array containing the class inheritance tree from the root object to the class.

This method must be overridden, or phpDocumentor will halt with a fatal error

Tags:

  • return - Converter-specific class tree for an individual class
  • abstract -

Overridden in child classes as:

CHMdefaultConverter::generateFormattedClassTree()
returns an array containing the class inheritance tree from the root object to the class
XMLDocBookpeardoc2Converter::generateFormattedClassTree()
returns an array containing the class inheritance tree from the root object to the class
XMLDocBookConverter::generateFormattedClassTree()
returns an array containing the class inheritance tree from the root object to the class
HTMLSmartyConverter::generateFormattedClassTree()
returns an array containing the class inheritance tree from the root object to the class
HTMLframesConverter::generateFormattedClassTree()
returns an array containing the class inheritance tree from the root object to the class

Parameters:

[ Top ]

getClassesOnPage

array getClassesOnPage( parserData &$element)

[line 4589]

gets a list of all classes declared on a procedural page represented by

$element, a parserData class

Tags:

  • return -

    links to each classes documentation

    Format:

     array('name' => class name,
           'sdesc' => summary of the class
           'link' => link to the class's documentation)

Parameters:

[ Top ]

getClassLink

mixed getClassLink( string $expr, string $package, [ $file = false], [ $text = false])

[line 3175]

return false or a classLink to $expr

Tags:

  • return - returns a classLink or false if the element is not found in package $package
  • see - classLink

Overridden in child classes as:

CHMdefaultConverter::getClassLink()
XMLDocBookpeardoc2Converter::getClassLink()
XMLDocBookConverter::getClassLink()
HTMLSmartyConverter::getClassLink()
HTMLframesConverter::getClassLink()
PDFdefaultConverter::getClassLink()

Parameters:

  • string $expr - class name
  • string $package - package name
  • $file -
  • $text -

[ Top ]

getConstLink

mixed getConstLink( string $expr, string $class, string $package, [ $file = false], [ $text = false])

[line 3350]

return false or a constLink to $expr in $class

Tags:

  • return - returns a varLink or false if the element is not found in package $package, class $class
  • see - constLink

Overridden in child classes as:

CHMdefaultConverter::getConstLink()
HTMLSmartyConverter::getConstLink()
HTMLframesConverter::getConstLink()
PDFdefaultConverter::getConstLink()

Parameters:

  • string $expr - constant name
  • string $class - class name
  • string $package - package name
  • $file -
  • $text -

[ Top ]

getConverterDir

string getConverterDir( )

[line 5158]

Get the absolute path to the converter's base directory

Parameters:

[ Top ]

getCurrentPageLink

string getCurrentPageLink( )

[line 1115]

Tags:

  • return - Link to the current page being parsed. Should return $curname and a converter-specific extension.
  • abstract -

Overridden in child classes as:

CHMdefaultConverter::getCurrentPageLink()
HTMLSmartyConverter::getCurrentPageLink()
HTMLframesConverter::getCurrentPageLink()

Parameters:

[ Top ]

getCurrentPageURL

string getCurrentPageURL( string $pathinfo)

[line 1095]

Return the path to the current

Parameters:

  • string $pathinfo -

[ Top ]

getDefineLink

mixed getDefineLink( string $expr, string $package, [ $file = false], [ $text = false])

[line 3223]

return false or a defineLink to $expr

Tags:

  • return - returns a defineLink or false if the element is not found in package $package
  • see - defineLink

Overridden in child classes as:

CHMdefaultConverter::getDefineLink()
XMLDocBookpeardoc2Converter::getDefineLink()
XMLDocBookConverter::getDefineLink()
HTMLSmartyConverter::getDefineLink()
HTMLframesConverter::getDefineLink()
PDFdefaultConverter::getDefineLink()

Parameters:

  • string $expr - constant name
  • string $package - package name
  • $file -
  • $text -

[ Top ]

getFileSourceName

string getFileSourceName( $path, string $pathinfo)

[line 1070]

Translate the path info into a unique file name for the highlighted source code.

Overridden in child classes as:

PDFdefaultConverter::getFileSourceName()

Parameters:

  • string $pathinfo -
  • $path -

[ Top ]

getFileSourcePath

string getFileSourcePath( string $base)

[line 1083]

Return the fixed path to the source-code file folder.

Parameters:

  • string $base - Path is relative to this folder

[ Top ]

getFormattedConflicts

array getFormattedConflicts( mixed &$element, string $type)

[line 4690]

Tags:

Parameters:

[ Top ]

getFormattedDescMethods

array getFormattedDescMethods( parserMethod &$element)

[line 4710]

Get a list of methods in child classes that override this method

Tags:

Parameters:

[ Top ]

getFormattedDescVars

array getFormattedDescVars( parserVar &$element)

[line 4731]

Get a list of vars in child classes that override this var

Tags:

Parameters:

[ Top ]

getFormattedImplements

string getFormattedImplements( parserClass $el)

[line 4653]

returns an array containing the class inheritance tree from the root object to the class.

This method must be overridden, or phpDocumentor will halt with a fatal error

Tags:

  • return - Converter-specific class tree for an individual class
  • abstract -

Parameters:

[ Top ]

getFormattedInheritedConsts

array getFormattedInheritedConsts( parserConst $child)

[line 4995]

Return template-enabled list of inherited class constants

uses parserConst helper function getInheritedConsts and generates a template-enabled list using getClassLink()

Tags:

  • return - Format:
     array(
       array('parent_class' => link to parent class's documentation,
             'ivars' =>
                array(
                  array('name' => inherited constant name,
                        'link' => link to inherited constant's documentation,
                        'value' => constant value,
                        'sdesc' => summary of inherited constant),
                  ...),
       ...)
  • see - Converter::getClassLink(), parserMethod::getInheritedConsts()

Parameters:

[ Top ]

getFormattedInheritedMethods

array getFormattedInheritedMethods( parserMethod $child)

[line 4907]

Return template-enabled list of inherited methods

uses parserMethod helper function getInheritedMethods and generates a template-enabled list using getClassLink()

Tags:

  • return - Format:
     array(
       array('parent_class' => link to parent class's documentation,
             'ivars' =>
                array(
                  array('name' => inherited variable name,
                        'link' => link to inherited variable's documentation,
                        'function_call' => parserMethod::getIntricateFunctionCall()
                                           returned array,
                        'sdesc' => summary of inherited variable),
                  ...),
       ...)
  • see - Converter::getClassLink(), parserMethod::getInheritedMethods()

Parameters:

[ Top ]

getFormattedInheritedVars

array getFormattedInheritedVars( parserVar $child)

[line 4836]

Return template-enabled list of inherited variables

uses parserVar helper function getInheritedVars and generates a template-enabled list using getClassLink()

Tags:

  • return - Format:
     array(
       array('parent_class' => link to parent class's documentation,
             'ivars' =>
                array(
                  array('name' => inherited variable name,
                        'link' => link to inherited variable's documentation,
                        'default' => default value of inherited variable,
                        'sdesc' => summary of inherited variable),
                  ...),
       ...)
  • see - Converter::getClassLink(), parserVar::getInheritedVars()

Parameters:

[ Top ]

getFormattedMethodImplements

array|false getFormattedMethodImplements( parserMethod &$element)

[line 4769]

Get the method this method(s) implemented from an interface, if any

Tags:

Parameters:

[ Top ]

getFormattedOverrides

array|false getFormattedOverrides( parserMethod &$element)

[line 4752]

Get the method this method overrides, if any

Tags:

Parameters:

[ Top ]

getFunctionLink

mixed getFunctionLink( string $expr, string $package, [ $file = false], [ $text = false])

[line 3199]

return false or a functionLink to $expr

Tags:

Overridden in child classes as:

CHMdefaultConverter::getFunctionLink()
XMLDocBookpeardoc2Converter::getFunctionLink()
XMLDocBookConverter::getFunctionLink()
HTMLSmartyConverter::getFunctionLink()
HTMLframesConverter::getFunctionLink()
PDFdefaultConverter::getFunctionLink()

Parameters: