Located in File: /phpDocumentor/Converter.inc
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:
 $class =  false (line 105)
 
 $class_contents = array() (line 269)
 The class itself has a link under ###main
 array(package =>
       array(subpackage =>
             array(path =>
                   array(class =>
                         array(abstractLink descendant 1, ...
                        )
                  )
            )
      )
 $class_elements = array() (line 208)
 
 $define_elements = array() (line 201)
 
 $elements = array() (line 187)
 
 $function_elements = array() (line 222)
 
 $global_elements = array() (line 215)
 
 $highlightingSource =  false (line 325)
 
 $leftindex = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => true, 'globals' => true) (line 384)
 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.
 $outputformat =  'Generic' (line 90)
 in Child converters, this will match the first part of the -o command-line as in -o HTML:frames:default "HTML"
 $packagecategories (line 359)
 Used by the XML:DocBook/peardoc2 converter, and available to others, to group many packages into categories
 $package_elements = array() (line 180)
 
 $package_output (line 141)
 
 $package_parents (line 349)
 Every package that contains classes may have parent or child classes in other packages. In other words, this code is legal:
In this case, package one is a parent of package two
 $page_contents = array() (line 238)
 The page itself has a link under ###main
 $page_elements = array() (line 194)
 
 $parseprivate (line 276)
 defaults to false. Set with command-line --parseprivate or -pp
 $pkg_elements = array() (line 229)
 
 $processSpecialRoots =  false (line 81)
 In order to fix PEAR Bug #6389
 $quietmode (line 283)
 defaults to false. Set to true for cron jobs or other situations where no visual output is necessary
 $sort_absolutely_everything =  false (line 251)
 This fixes bug 637921, and is used by PDFdefaultConverter
 $sort_page_contents_by_type =  false (line 245)
 
 $sourcePaths = array() (line 372)
 
 $targetDir =  '' (line 289)
 
 $templateDir =  '' (line 295)
 
 $templateName =  '' (line 308)
 
 $template_options (line 399)
 
 $title =  'Generated Documentation' (line 392)
 
 Constructor Converter (line 452)
 
 Method AttrToString (line 1307)
 to a string based on the template options.ini
 Method Bolden (line 931)
 
 Method Br (line 1001)
 Overridden in child classes as:
		
 Method checkState (line 5393)
 
 Method Convert (line 3982)
 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.
 Method convertClass (line 4046)
 Overridden in child classes as:
		
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.}}
 Method convertConst (line 4233)
 Overridden in child classes as:
		
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
 Method convertDefine (line 4358)
 Overridden in child classes as:
		
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()}}
 Method ConvertErrorLog (line 2426)
 Overridden in child classes as:
		
 Method convertFunction (line 4415)
 Overridden in child classes as:
		
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
 Method convertGlobal (line 4324)
 Overridden in child classes as:
		
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()}}
 Method convertInclude (line 4387)
 Overridden in child classes as:
		
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
 Method convertMethod (line 4113)
 Overridden in child classes as:
		
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
 Method convertPage (line 4278)
 Overridden in child classes as:
		
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.}}
 Method ConvertTitle (line 1396)
 to a string based on the template options.ini
 Method ConvertTodoList (line 2434)
 Overridden in child classes as:
		
 Method convertTutorial (line 4010)
 Overridden in child classes as:
		
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.}}
 Method convertVar (line 4181)
 Overridden in child classes as:
		
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
 Method Convert_RIC (line 3962)
 Overridden in child classes as:
		
 Method copyFile (line 5368)
 thanks to Robert Hoffmann for this fix
 Method createParentDir (line 5284)
 
 Method EncloseList (line 888)
 
 Method EncloseParagraph (line 917)
 
 Method endClass (line 507)
 Overridden in child classes as:
		
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
 Method endPage (line 521)
 Overridden in child classes as:
		
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
 Method exampleProgramExample (line 773)
 Overridden in child classes as:
		
By default, this just wraps ProgramExample
 Method flushHighlightCache (line 609)
 
 Method formatIndex (line 545)
 Overridden in child classes as:
		
This method is intended to be the place that $elements is formatted for output.
 Method formatLeftIndex (line 559)
 Overridden in child classes as:
		
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
 Method formatPkgIndex (line 533)
 Overridden in child classes as:
		
This method is intended to be the place that $pkg_elements is formatted for output.
 Method formatTutorialTOC (line 1030)
 Overridden in child classes as:
		
This function should return a formatted table of contents. By default, it does nothing, it is up to the converter to format the TOC
 Method generateChildClassList (line 4818)
 Overridden in child classes as:
		
 Method generateFormattedClassTree (line 4665)
 Overridden in child classes as:
		
This method must be overridden, or phpDocumentor will halt with a fatal error
 Method getClassesOnPage (line 4617)
 $element, a parserData class
links to each classes documentation
Format:
 array('name' => class name,
       'sdesc' => summary of the class
       'link' => link to the class's documentation)
 Method getClassLink (line 3179)
 Overridden in child classes as:
		
 Method getConstLink (line 3354)
 Overridden in child classes as:
		
 Method getConverterDir (line 5189)
 
 Method getCurrentPageLink (line 1115)
 Overridden in child classes as:
		
 Method getCurrentPageURL (line 1095)
 
 Method getDefineLink (line 3227)
 Overridden in child classes as:
		
 Method getFileSourceName (line 1070)
 Overridden in child classes as:
		
 Method getFileSourcePath (line 1083)
 
 Method getFormattedConflicts (line 4718)
 
 Method getFormattedDescMethods (line 4738)
 
 Method getFormattedDescVars (line 4759)
 
 Method getFormattedImplements (line 4681)
 This method must be overridden, or phpDocumentor will halt with a fatal error
 Method getFormattedInheritedConsts (line 5023)
 uses parserConst helper function getInheritedConsts and generates a template-enabled list using getClassLink()
 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),
              ...),
   ...)
 Method getFormattedInheritedMethods (line 4935)
 uses parserMethod helper function getInheritedMethods and generates a template-enabled list using getClassLink()
 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),
              ...),
   ...)
 Method getFormattedInheritedVars (line 4864)
 uses parserVar helper function getInheritedVars and generates a template-enabled list using getClassLink()
 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),
              ...),
   ...)
 Method getFormattedMethodImplements (line 4797)
 
 Method getFormattedOverrides (line 4780)
 
 Method getFunctionLink (line 3203)
 Overridden in child classes as:
		
 Method getGlobalLink (line 3251)
 Overridden in child classes as:
		
 Method getGlobalValue (line 5213)
 Overridden in child classes as:
		
If a global variable's default value is "new class" as in:
 Method getId (line 3952)
 Overridden in child classes as:
		
unique ID in the format needed for the Converter
 Method getIncludeValue (line 5254)
 Although not very smart yet, this method will try to look for the included file file.ext:
If it finds it, it will return a link to the file's documentation. As of 1.2.0rc1, phpDocumentor is smarty enough to find these cases:
 Method getLink (line 3565)
 Overridden in child classes as:
		
$expr is a string with many allowable formats:
New in version 1.1, you can explicitly specify a package to link to that is different from the current package. Use the # operator to specify a new package, as in tests#bug-540368.php (which should appear as a link like: "bug-540368.php"). This example links to the procedural page bug-540368.php in package tests. Also, the "function" operator is now used to specifically link to a function instead of a method in the current class.
If classname:: is not present, and the see tag is in a documentation block within a class, then the function uses the classname to search for $expr as a function or variable within classname, or any of its parent classes. given an $expr without '$', '::' or '()' getLink first searches for classes, procedural pages, constants, global variables, and then searches for methods and variables within the default class, and finally for any function
 Method getMethodLink (line 3300)
 Overridden in child classes as:
		
 Method getPageLink (line 3275)
 Overridden in child classes as:
		
 Method getSortedClassTreeFromClass (line 2954)
 The data structure returned is designed for a non-recursive algorithm, and is somewhat complex. In most cases, the array returned is:
 array('#root' =>
         array('link' => classLink to $class,
               'parent' => false,
               'children' => array(array('class' => 'childclass1',
                                         'package' => 'child1package'),
                                    array('class' => 'childclass2',
                                         'package' => 'child2package'),...
                                  )
               ),
       'child1package#childclass1' =>
         array('link' => classLink to childclass1,
               'parent' => '#root',
               'children' => array(array('class' => 'kidclass',
                                         'package' => 'kidpackage'),...
                                  )
              ),
       'kidpackage#kidclass' =>
         array('link' => classLink to kidclass,
               'parent' => 'child1package#childclass1',
               'children' => array() // no children
              ),
      ....
      )To describe this format using language, every class in the tree has an entry in the first level of the array. The index for all child classes that extend the root class is childpackage#childclassname. Each entry in the array has 3 elements: link, parent, and children.
special cases are when the #root class has a parent in another package, or when the #root class extends a class not found by phpDocumentor. In the first case, parent will be a classLink to the parent class. In the second, parent will be the extends clause, as in:
The fastest way to design a method to process the array returned is to copy HTMLframesConverter::getRootTree() into your converter and to modify the html to whatever output format you are going to use
 Method getSourceLink (line 1105)
 Overridden in child classes as:
		
 Method getState (line 5382)
 Overridden in child classes as:
		
 Method getTutorialId (line 1418)
 Overridden in child classes as:
		
Used by {@id}
 Method getTutorialLink (line 3417)
 Take a string and return an abstract link to the tutorial it represents. Since tutorial naming literally works like the underlying filesystem, the way to reference the tutorial is similar. Tutorials are located in a subdirectory of any directory parsed, which is named 'tutorials/' (we try to make things simple when we can :). They are further organized by package and subpackage as:
tutorials/package/subpackage
and the files are named *.cls, *.pkg, or *.proc, and so a link to a tutorial named file.cls can be referenced (depending on context) as any of:
The first case will only be needed if file.cls exists in both the current package, in anotherpackage/file.cls and in anotherpackage/subpackage/file.cls and you wish to reference the one in anotherpackage/subpackage. The second case is only needed if you wish to reference file.cls in another package and it is unique in that package. the third will link to the first file.cls it finds using this search method:
 Method getTutorialTree (line 1974)
 Overridden in child classes as:
		
Returns an array in format:
 array('tutorial' => parserTutorial,
       'kids' => array( // child tutorials
                   array('tutorial' => child parserTutorial,
                         'kids' => array(...)
                        )
                      )
      )
 Method getVarLink (line 3327)
 Overridden in child classes as:
		
 Method hasSourceCode (line 1159)
 Wrapper for $sourcePaths in this version
 Method hasTutorial (line 490)
 
 Method highlightDocBlockSource (line 690)
 default returns it unchanged. Mainly used by the HighlightParser
 Method highlightSource (line 637)
 default returns it unchanged. Mainly used by the HighlightParser
 Method highlightTutorialSource (line 728)
 default returns it unchanged. Mainly used by the HighlightParser
 Method Italicize (line 945)
 
 Method Kbdize (line 973)
 
 Method ListItem (line 874)
 
 Method newSmarty (line 5075)
 This returns a Smarty template with pre-initialized variables for use. If the method "SmartyInit()" exists, it is called.
 Method Output (line 5137)
 Overridden in child classes as:
		
 Method postProcess (line 1016)
 Overridden in child classes as:
		
Perform necessary post-processing of string data. For example, the HTML Converters should escape < and > to become < and >
 Method prepareDocBlock (line 4480)
 Overridden in child classes as:
		
This function converts all tags and descriptions for output
 array('sdesc' => DocBlock summary
       'desc' => DocBlock detailed description
       'tags' => array('keyword' => tagname, 'data' => tag description)
                 known tags
       'api_tags' => array('keyword' => tagname, 'data' => tag description)
                 known api documentation tags
       'info_tags' => array('keyword' => tagname, 'data' => tag description)
                 known informational tags
     [ 'utags' => array('keyword' => tagname, 'data' => tag description
                 unknown tags ]
     [ 'vartype' => type from @var/@return tag ]
     [ 'var_descrip' => description from @var/@return tag ]
      )
 Method PreserveWhiteSpace (line 903)
 
 Method ProgramExample (line 785)
 Overridden in child classes as:
		
 Method returnLink (line 3929)
 Overridden in child classes as:
		
 Method returnSee (line 3941)
 Overridden in child classes as:
		
in the format needed for the Converter
 Method Sampize (line 987)
 
 Method setSourcePaths (line 1174)
 
 Method setTargetDir (line 5312)
 Overridden in child classes as:
		
As of 1.3.0RC6, this also sets the compiled templates directory inside the target directory
 Method setTemplateBase (line 5148)
 
 Method setTemplateDir (line 5173)
 Overridden in child classes as:
		
Also sets $templateName to the $dir parameter
 Method sortPageContentsByElementType (line 2570)
 
 Method sourceLine (line 1130)
 Overridden in child classes as:
		
If the $path is a full path, then an anchor to the line number will be added as well
 Method TranslateEntity (line 1184)
 
 Method TranslateTag (line 1214)
 Overridden in child classes as:
		
 Method TutorialExample (line 860)
 Overridden in child classes as:
		
 Method type_adjust (line 759)
 Overridden in child classes as:
		
Used by XMLDocBookConverter::type_adjust() to change true and false to the peardoc2 values
 Method unmangle (line 574)
 Overridden in child classes as:
		
default returns it unchanged (html with xhtml tags)
 Method vardump_tree (line 2202)
 
 Method Varize (line 959)
 
 Method walk (line 1705)
 The walk() method should be flexible enough such that it never needs modification. walk() sets up all of the indexes, and sorts everything in logical alphabetical order. It then passes each element individually to Convert(), which then passes to the Convert*() methods. A child Converter need not override any of these unless special functionality must be added. see Converter Default Template Variables for details. {@ and the left indexes specified by $leftindexes, and then sorts them by calling sortIndexes().
Next, it converts all README/CHANGELOG/INSTALL-style files, using Convert_RIC.
After this, it passes all package-level docs to Convert(). Then, it calls the index sorting functions formatPkgIndex(), formatIndex() and formatLeftIndex().
Finally, it converts each procedural page in alphabetical order. This stage passes elements from the physical file to Convert() in alphabetical order. First, procedural page elements parserDefine, parserInclude parserGlobal, and parserFunction are passed to Convert().
Then, class elements are passed in this order: parserClass, then all of the parserVars in the class and all of the parserMethods in the class. Classes are in alphabetical order, and both vars and methods are in alphabetical order.
Finally, ConvertErrorLog() is called and the data walk is complete.}}
 Method walk_everything (line 2267)
 This method is designed for converters like the PDF converter that need everything passed in alphabetical order by package/subpackage and by procedural and then class information
 Method writeExample (line 1060)
 Overridden in child classes as:
		
This function provides the primary functionality for the @example tag.
 Method writeFile (line 5345)
 Overridden in child classes as:
		
 Method writeSource (line 1044)
 Overridden in child classes as:
		
This function provides the primary functionality for the @filesource tag.
 Method _rmdir (line 5114)
 
 Method _setHighlightCache (line 593)
 
 Method _tutorial_path (line 2081)