phpDocumentor Converters
[ class tree: Converters ] [ index: Converters ] [ all elements ]

Class: Converter

Source Location: /phpDocumentor/Converter.inc

Class Converter

Class Overview

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.}}

Located in /phpDocumentor/Converter.inc [line 75]



		
				Author(s):
		
		
		API Tags:
Abstract:  

Information Tags:
Version:  $Id: Converter.inc,v 1.33 2006/10/22 18:54:47 cellog Exp $
Since:  1.0rc1

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
CHMdefaultConverter Generates files that MS HTML Help Worshop can use to create a MS Windows compiled help file (CHM)
HTMLSmartyConverter HTML output converter.
HTMLframesConverter HTML output converter.
PDFdefaultConverter PDF output converter.
XMLDocBookpeardoc2Converter XML DocBook converter.
XMLDocBookConverter XML DocBook converter.

[ Top ]
Property Summary
array   $all_packages   All packages encountered in parsing
string|false   $class   set to a classname if currently parsing a class, false if not
Classes   $classes   All class information, organized by path, and by package
array   $class_contents   alphabetical index of all methods and vars in a class by package/subpackage
Smarty   $class_data   template for the class currently being processed
array   $class_elements   alphabetized index of classes by package
mixed   $curfile   full path of the current file being converted
parserPage   $curpage   current procedural page being processed
array   $define_elements   alphabetized index of defines by package
array   $elements   alphabetical index of all elements
array   $function_elements   alphabetized index of functions by package
array   $global_elements   alphabetized index of global variables by package
boolean   $highlightingSource   Flag used to help converters determine whether to do special source highlighting
array   $leftindex   Controls which of the one-element-only indexes are generated.
string   $outputformat   output format of this converter
string   $package   package name currently being converted
array   $packagecategories   Packages associated with categories
array   $package_elements   alphabetical index of all elements sorted by package, subpackage, page, and class.
mixed   $package_output   set to value of -po commandline
array   $package_parents   Hierarchy of packages
string   $page   name of current page being converted
array   $page_contents   alphabetical index of all elements on a page by package/subpackage
Smarty   $page_data   template for the procedural page currently being processed
array   $page_elements   alphabetized index of procedural pages by package
bool   $parseprivate   controls processing of elements marked private with @access private
string   $path   path of current page being converted
array   $pkg_elements   alphabetical index of all elements, indexed by package/subpackage
boolean   $processSpecialRoots   This converter knows about the new root tree processing
bool   $quietmode   controls display of progress information while parsing.
string   $smarty_dir   Directory that the smarty templates are in
mixed   $sort_absolutely_everything   This is used if the content must be passed in the order it should be read, i.e. by package, procedural then classes
boolean   $sort_page_contents_by_type   This determines whether the $page_contents array should be sorted by element type as well as alphabetically by name
array   $sourcePaths   A list of files that have had source code generated
string   $subpackage   subpackage name currently being converted
mixed   $targetDir   directory that output is sent to. -t command-line sets this.
string   $templateDir   Directory that the template is in, relative to phpDocumentor root directory
string   $templateName   Name of the template, from last part of -o
array   $template_options   Options for each template, parsed from the options.ini file in the template base directory
string   $title  
array   $todoList   List of all @todo tags and a link to the element with the @todo

[ Top ]
Method Summary
Converter   Converter()   Initialize Converter data structures
string   AttrToString()   Convert the attribute of a Tutorial docbook tag's attribute list
string   Bolden()   Used to convert the contents of <b> in a docblock
string   Br()   Used to convert <br> in a docblock
void   checkState()   Compare parserStringWithInlineTags::Convert() cache state to $state
void   cleanup()   Finish up parsing/cleanup directories
void   Convert()   Convert all elements to output format
void   convertClass()   Default Class Handler
void   convertConst()   Converts class constants for template output.
void   convertDefine()   Converts defines for template output
void   ConvertErrorLog()   Convert the phpDocumentor parsing/conversion error log
void   convertFunction()   Converts function for template output
void   convertGlobal()   Converts global variables for template output
void   convertInclude()   Converts includes for template output
void   convertMethod()   Converts method for template output
void   convertPage()   Default Page Handler
string   ConvertTitle()   Convert the title of a Tutorial docbook tag section
void   ConvertTodoList()   Convert the list of all @todo tags
void   &convertTutorial()   Default Tutorial Handler
void   convertVar()   Converts class variables for template output.
void   Convert_RIC()   Convert README/INSTALL/CHANGELOG file contents to output format
void   copyFile()   Copies a file from the template directory to the target directory
void   createParentDir()   Recursively creates all subdirectories that don't exist in the $dir path
string   EncloseList()   Used to convert the contents of <ol> or <ul> in a docblock
string   EncloseParagraph()   Used to enclose a paragraph in a docblock
void   endClass()   Called by walk() while converting, when the last class element has been parsed.
void   endPage()   Called by walk() while converting, when the last procedural page element has been parsed.
string   exampleProgramExample()   Used to convert the {@example} inline tag in a docblock.
string   flushHighlightCache()   Return the close text for the current token
void   formatIndex()   Called by walk() while converting.
void   formatLeftIndex()   Called by walk() while converting.
void   formatPkgIndex()   Called by walk() while converting.
string   formatTutorialTOC()   Creates a table of contents for a {@toc} inline tag in a tutorial
void   generateChildClassList()   returns a list of child classes
string   generateFormattedClassTree()   returns an array containing the class inheritance tree from the root object to the class.
array   getClassesOnPage()   gets a list of all classes declared on a procedural page represented by
mixed   getClassLink()   return false or a classLink to $expr
mixed   getConstLink()   return false or a constLink to $expr in $class
string   getConverterDir()   Get the absolute path to the converter's base directory
string   getCurrentPageLink()  
string   getCurrentPageURL()   Return the path to the current
mixed   getDefineLink()   return false or a defineLink to $expr
string   getFileSourceName()   Translate the path info into a unique file name for the highlighted source code.
string   getFileSourcePath()   Return the fixed path to the source-code file folder.
array   getFormattedConflicts()  
array   getFormattedDescMethods()   Get a list of methods in child classes that override this method
array   getFormattedDescVars()   Get a list of vars in child classes that override this var
string   getFormattedImplements()   returns an array containing the class inheritance tree from the root object to the class.
array   getFormattedInheritedConsts()   Return template-enabled list of inherited class constants
array   getFormattedInheritedMethods()   Return template-enabled list of inherited methods
array   getFormattedInheritedVars()   Return template-enabled list of inherited variables
array|false   getFormattedMethodImplements()   Get the method this method(s) implemented from an interface, if any
array|false   getFormattedOverrides()   Get the method this method overrides, if any
mixed   getFunctionLink()   return false or a functionLink to $expr
mixed   getGlobalLink()   return false or a globalLink to $expr
string   getGlobalValue()   Parse a global variable's default value for class initialization.
void   getHighlightState()  
string   getId()   take abstractLink descendant and text $eltext and return a
string   getIncludeValue()   Parse an include's file to see if it is a file documented in this project
mixed   &getLink()   The meat of the @see tag and inline {@link} tag
mixed   getMethodLink()   return false or a methodLink to $expr in $class
mixed   getPageLink()   return false or a pageLink to $expr
array   getSortedClassTreeFromClass()   Return a tree of all classes that extend this class
string   getSourceLink()  
void   getState()   Return parserStringWithInlineTags::Convert() cache state
string   getTutorialId()   Return a converter-specific id to distinguish tutorials and their sections
tutorialLink|string   getTutorialLink()   The meat of the @tutorial tag and inline {@tutorial} tag
array   getTutorialTree()   Get a tree structure representing the hierarchy of tutorials
mixed   getVarLink()   return false or a varLink to $expr in $class
boolean   hasSourceCode()   Determine whether an element's file has generated source code, used for linking to line numbers of source.
false|parserTutorial   hasTutorial()  
string   highlightDocBlockSource()   Used to allow converters to format the source code of DocBlocks the way they'd like.
string   highlightSource()   Used to allow converters to format the source code the way they'd like.
string   highlightTutorialSource()   Used to allow converters to format the source code of Tutorial XML the way they'd like.
string   Italicize()   Used to convert the contents of <i> in a docblock
string   Kbdize()   Used to convert the contents of <kbd> in a docblock
string   ListItem()   Used to convert the contents of <li> in a docblock
Smarty   &newSmarty()   Return a Smarty template object to operate with
void   Output()   do all necessary output
string   postProcess()   This version does nothing
array   prepareDocBlock()   convert the element's DocBlock for output
string   PreserveWhiteSpace()   Used to convert the contents of <pre> in a docblock
string   ProgramExample()   Used to convert the <code> tag in a docblock
string   returnLink()   take URL $link and text $text and return a link in the format needed for the Converter
string   returnSee()   take abstractLink descendant and text $eltext and return a link
string   Sampize()   Used to convert the contents of <samp> in a docblock
void   setSourcePaths()   Mark a file as having had source code highlighted
void   setTargetDir()   Sets the output directory for generated documentation
void   setTemplateBase()   Set the template directory with a different template base directory
void   setTemplateDir()   sets the template directory based on the $outputformat and $name
void   sortPageContentsByElementType()   sorts $page_contents by element type as well as alphabetically
string   sourceLine()   Return a line of highlighted source code with formatted line number
void   startHighlight()   Initialize highlight caching
void   TranslateEntity()   Used to translate an XML DocBook entity like &rdquo; from a tutorial by reading the options.ini file for the template.
string   TranslateTag()   Used to translate an XML DocBook tag from a tutorial by reading the options.ini file for the template.
void   TutorialExample()  
string   type_adjust()   Called by parserReturnTag::Convert() to allow converters to change type names to desired formatting
string   unmangle()   Called by parserSourceInlineTag::stringConvert() to allow converters to format the source code the way they'd like.
string   vardump_tree()   Debugging function for dumping $tutorial_tree
string   Varize()   Used to convert the contents of <var> in a docblock
void   walk()   called by phpDocumentor_IntermediateParser::Convert() to traverse the array of pages and their elements, converting them to the output format
void   walk_everything()   walk over elements by package rather than page
void   writeExample()   Write out the formatted source code for an example php file
void   writeFile()   Writes a file to target dir
void   writeSource()   Write out the formatted source code for a php file
void   _rmdir()   Completely remove a directory and its contents
void   _setHighlightCache()  
string   _tutorial_path()   Returns the path to this tutorial as a string

[ Top ]
Properties
array   $all_packages [line 367]

All packages encountered in parsing

API Tags:
See:  phpDocumentor_IntermediateParser::$all_packages


[ Top ]
string|false   $class = false [line 106]

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


Redefined in descendants as:

[ Top ]
Classes   $classes [line 320]

All class information, organized by path, and by package


[ Top ]
array   $class_contents = array() [line 270]

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

The class itself has a link under ###main

API Tags:
See:  Converter::formatLeftIndex()


[ Top ]
Smarty   $class_data [line 166]

template for the class currently being processed


Redefined in descendants as:

[ Top ]
array   $class_elements = array() [line 209]

alphabetized index of classes by package

API Tags:
See:  Converter::$leftindex


[ Top ]
mixed   $curfile [line 314]

full path of the current file being converted


[ Top ]
parserPage   $curpage [line 172]

current procedural page being processed


[ Top ]
array   $define_elements = array() [line 202]

alphabetized index of defines by package

API Tags:
See:  Converter::$leftindex


[ Top ]
array   $elements = array() [line 188]

alphabetical index of all elements

API Tags:
See:  Converter::formatIndex(), HTMLframesConverter::formatIndex()


[ Top ]
array   $function_elements = array() [line 223]

alphabetized index of functions by package

API Tags:
See:  Converter::$leftindex


[ Top ]
array   $global_elements = array() [line 216]

alphabetized index of global variables by package

API Tags:
See:  Converter::$leftindex


[ Top ]
boolean   $highlightingSource = false [line 326]

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


[ Top ]
array   $leftindex = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => true, 'globals' => true) [line 385]

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.

API Tags:
See:  Converter::formatLeftIndex()
See:  Converter::$class_elements, Converter::$page_elements, Converter::$function_elements, Converter::$define_elements, Converter::$global_elements


Redefined in descendants as:

[ Top ]
string   $outputformat = 'Generic' [line 91]

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"

Information Tags:
Tutorial:  phpDocumentor 1.3.1 Tutorial

Redefined in descendants as:

[ Top ]
string   $package = 'default' [line 96]

package name currently being converted


[ Top ]
array   $packagecategories [line 360]

Packages associated with categories

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

API Tags:
See:  phpDocumentor_IntermediateParser::$packagecategories


[ Top ]
array   $package_elements = array() [line 181]

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

API Tags:
Uses:  Converter::$sort_absolutely_everything - if true, then $package_elements is used, otherwise, the ParserData::$classelements and ParserData::$pageelements variables are used


[ Top ]
mixed   $package_output [line 142]

set to value of -po commandline

Information Tags:
Tutorial:  phpDocumentor 1.3.1 Tutorial

[ Top ]
array   $package_parents [line 350]

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

API Tags:
See:  phpDocumentor_IntermediateParser::$package_parents


[ Top ]
string   $page [line 148]

name of current page being converted


Redefined in descendants as:

[ Top ]
array   $page_contents = array() [line 239]

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

The page itself has a link under ###main

API Tags:
See:  Converter::formatLeftIndex()


[ Top ]
Smarty   $page_data [line 160]

template for the procedural page currently being processed


Redefined in descendants as:

[ Top ]
array   $page_elements = array() [line 195]

alphabetized index of procedural pages by package

API Tags:
See:  Converter::$leftindex


[ Top ]
bool   $parseprivate [line 277]

controls processing of elements marked private with @access private

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


[ Top ]
string   $path [line 154]

path of current page being converted


Redefined in descendants as:

[ Top ]
array   $pkg_elements = array() [line 230]

alphabetical index of all elements, indexed by package/subpackage

API Tags:
See:  Converter::formatPkgIndex(), HTMLframesConverter::formatPkgIndex()


[ Top ]
boolean   $processSpecialRoots = false [line 82]

This converter knows about the new root tree processing

In order to fix PEAR Bug #6389


Redefined in descendants as:

[ Top ]
bool   $quietmode [line 284]

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


[ Top ]
string   $smarty_dir = '' [line 302]

Directory that the smarty templates are in


Redefined in descendants as:

[ Top ]
mixed   $sort_absolutely_everything = false [line 252]

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

API Tags:
Usedby:  Converter::$package_elements - if true, then $package_elements is used, otherwise, the ParserData::$classelements and ParserData::$pageelements variables are used


Redefined in descendants as:

[ Top ]
boolean   $sort_page_contents_by_type = false [line 246]

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

API Tags:
See:  Converter::sortPageContentsByElementType()


Redefined in descendants as:

[ Top ]
array   $sourcePaths = array() [line 373]

A list of files that have had source code generated


[ Top ]
string   $subpackage = '' [line 101]

subpackage name currently being converted


[ Top ]
mixed   $targetDir = '' [line 290]

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

Information Tags:
Tutorial:  phpDocumentor 1.3.1 Tutorial

[ Top ]
string   $templateDir = '' [line 296]

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


[ Top ]
string   $templateName = '' [line 309]

Name of the template, from last part of -o

Information Tags:
Tutorial:  phpDocumentor 1.3.1 Tutorial

[ Top ]
array   $template_options [line 400]

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

Information Tags:
Tutorial:  phpDocumentor Tutorials

Redefined in descendants as:

[ Top ]
string   $title = 'Generated Documentation' [line 393]
API Tags:
See:  phpDocumentor_IntermediateParser::$title


[ Top ]
array   $todoList = array() [line 430]

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

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

Information Tags:
Tutorial:  @todo

[ Top ]
Methods
Constructor Converter  [line 453]

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

Initialize Converter data structures

Parameters:
array   &$allp:  $all_packages value
array   &$packp:  $package_parents value
Classes   &$classes:  $classes value
ProceduralPages   &$procpages:  $proceduralpages value
array   $po:  $package_output value
boolean   $pp:  $parseprivate value
boolean   $qm:  $quietmode value
string   $targetDir:  $targetDir value
string   $template:  $templateDir value
string   $title:  (@link $title} value


[ Top ]
AttrToString  [line 1293]

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

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  [line 932]

  string Bolden( string $para  )

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

Parameters:
string   $para: 

API Tags:
Usedby:  parserB::Convert()


[ Top ]
Br  [line 1002]

  string Br( string $para  )

Used to convert <br> in a docblock

Parameters:
string   $para: 

API Tags:
Usedby:  parserBr::Convert()


Redefined in descendants as:

[ Top ]
checkState  [line 5328]

  void checkState( mixed $state  )

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

Parameters:
mixed   $state: 

API Tags:
Abstract:  
See:  parserStringWithInlineTags::Convert()


[ Top ]
cleanup  [line 5039]

  void cleanup( )

Finish up parsing/cleanup directories



[ Top ]
Convert  [line 3965]

  void Convert( mixed &$element  )

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.

Parameters:
mixed   &$element:  parserElement descendant or parserPackagePage or parserData

Information Tags:
Throws:  PDERROR_NO_CONVERT_HANDLER

[ Top ]
convertClass  [line 4029]

  void convertClass( &$element  )

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.}}

Parameters:
   &$element: 


Redefined in descendants as:

[ Top ]
convertConst  [line 4199]

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

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

Parameters:
parserConst   &$element: 
   $additions: 


Redefined in descendants as:

[ Top ]
convertDefine  [line 4316]

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

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()}}

Parameters:
parserDefine   &$element: 
array   $addition:  any additional template variables should be in this array

API Tags:
Uses:  Converter::postProcess() - on define_value template value, makes it displayable


Redefined in descendants as:

[ Top ]
ConvertErrorLog  [line 2408]

  void ConvertErrorLog( )

Convert the phpDocumentor parsing/conversion error log


API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
convertFunction  [line 4373]

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

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

Parameters:
parserFunction   &$element: 
   $addition: 

API Tags:
See:  Converter::prepareDocBlock()


Redefined in descendants as:

[ Top ]
convertGlobal  [line 4282]

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

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()}}

Parameters:
parserGlobal   &$element: 
array   $addition:  any additional template variables should be in this array

API Tags:
Uses:  Converter::postProcess() - on global_value template value, makes it displayable


Redefined in descendants as:

[ Top ]
convertInclude  [line 4345]

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

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

Parameters:
parserInclude   &$element: 
   $addition: 

API Tags:
See:  Converter::prepareDocBlock()


Redefined in descendants as:

[ Top ]
convertMethod  [line 4095]

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

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

Parameters:
parserMethod   &$element: 
   $additions: 


Redefined in descendants as:

[ Top ]
convertPage  [line 4236]

  void convertPage( parserPage &$element  )

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.}}

Parameters:
parserPage   &$element: 


Redefined in descendants as:

[ Top ]
ConvertTitle  [line 1382]

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

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  [line 2416]

  void ConvertTodoList( )

Convert the list of all @todo tags


API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
convertTutorial  [line 3993]

  void &convertTutorial( parserTutorial &$element  )

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.}}

Parameters:
parserTutorial   &$element: 


Redefined in descendants as:

[ Top ]
convertVar  [line 4155]

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

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

Parameters:
parserVar   &$element: 
   $additions: 


Redefined in descendants as:

[ Top ]
Convert_RIC  [line 3945]

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

Convert README/INSTALL/CHANGELOG file contents to output format

Parameters:
README|INSTALL|CHANGELOG   $name: 
string   $contents:  contents of the file

API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
copyFile  [line 5303]

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

Copies a file from the template directory to the target directory

thanks to Robert Hoffmann for this fix

Parameters:
string   $file: 
   $subdir: 


[ Top ]
createParentDir  [line 5219]

  void createParentDir( string $dir  )

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

Parameters:
string   $dir: 


[ Top ]
EncloseList  [line 889]

  string EncloseList( string $list, $ordered  )

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

Parameters:
string   $list: 
   $ordered: 

API Tags:
Usedby:  parserList::Convert() - enclose the list


[ Top ]
EncloseParagraph  [line 918]

  string EncloseParagraph( string $para  )

Used to enclose a paragraph in a docblock

Parameters:
string   $para: 


[ Top ]
endClass  [line 508]

  void endClass( )

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


API Tags:
Abstract:  
See:  HTMLframesConverter::endClass()


Redefined in descendants as:

[ Top ]
endPage  [line 522]

  void endPage( )

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


API Tags:
Abstract:  
See:  HTMLframesConverter::endClass()


Redefined in descendants as:

[ Top ]
exampleProgramExample  [line 774]

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

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

By default, this just wraps ProgramExample

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

API Tags:
See:  XMLDocBookpeardoc2Converter::exampleProgramExample


Redefined in descendants as:

[ Top ]
flushHighlightCache  [line 610]

  string flushHighlightCache( )

Return the close text for the current token



[ Top ]
formatIndex  [line 546]

  void formatIndex( )

Called by walk() while converting.

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


API Tags:
Abstract:  
See:  HTMLframesConverter::formatIndex()


Redefined in descendants as:

[ Top ]
formatLeftIndex  [line 560]

  void formatLeftIndex( )

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


API Tags:
Abstract:  
See:  HTMLframesConverter::formatLeftIndex()


Redefined in descendants as:

[ Top ]
formatPkgIndex  [line 534]

  void formatPkgIndex( )

Called by walk() while converting.

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


API Tags:
Abstract:  
See:  HTMLframesConverter::formatPkgIndex()


Redefined in descendants as:

[ Top ]
formatTutorialTOC  [line 1031]

  string formatTutorialTOC( array $toc  )

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

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

API Tags:
Return:  table of contents formatted for use in the current output format
Usedby:  parserTocInlineTag::Convert() - passes an array of format: <pre> array( 'tagname' => string name of tag, 'link' => tutorialLink to the tutorial, 'id' => converter specific tutorial ID from Converter::getTutorialId() 'title' => title of the tutorial) </pre> and returns the results as the table of contents
Abstract:  


Redefined in descendants as:

[ Top ]
generateChildClassList  [line 4756]

  void generateChildClassList( parserClass $class  )

returns a list of child classes

Parameters:
parserClass   $class:  class variable

API Tags:
Uses:  parserClass::getChildClassList()


Redefined in descendants as:

[ Top ]
generateFormattedClassTree  [line 4603]

  string generateFormattedClassTree( parserClass $class  )

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

Parameters:
parserClass   $class:  class variable

API Tags:
Return:  Converter-specific class tree for an individual class
Abstract:  


Redefined in descendants as:

[ Top ]
getClassesOnPage  [line 4555]

  array getClassesOnPage( parserData &$element  )

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

$element, a parserData class

Parameters:
parserData   &$element: 

API Tags:
Return:  

links to each classes documentation

Format:

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



[ Top ]
getClassLink  [line 3162]

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

return false or a classLink to $expr

Parameters:
string   $expr:  class name
string   $package:  package name
   $file: 
   $text: 

API Tags:
Return:  returns a classLink or false if the element is not found in package $package
See:  classLink


Redefined in descendants as:

[ Top ]
getConstLink  [line 3337]

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

return false or a constLink to $expr in $class

Parameters:
string   $expr:  constant name
string   $class:  class name
string   $package:  package name
   $file: 
   $text: 

API Tags:
Return:  returns a varLink or false if the element is not found in package $package, class $class
See:  constLink


Redefined in descendants as:

[ Top ]
getConverterDir  [line 5124]

  string getConverterDir( )

Get the absolute path to the converter's base directory



[ Top ]
getCurrentPageLink  [line 1116]

  string getCurrentPageLink( )


API Tags:
Return:  Link to the current page being parsed. Should return $curname and a converter-specific extension.
Abstract:  


Redefined in descendants as:

[ Top ]
getCurrentPageURL  [line 1096]

  string getCurrentPageURL( string $pathinfo  )

Return the path to the current

Parameters:
string   $pathinfo: 


[ Top ]
getDefineLink  [line 3210]

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

return false or a defineLink to $expr

Parameters:
string   $expr:  constant name
string   $package:  package name
   $file: 
   $text: 

API Tags:
Return:  returns a defineLink or false if the element is not found in package $package
See:  defineLink


Redefined in descendants as:

[ Top ]
getFileSourceName  [line 1071]

  string getFileSourceName( $path, string $pathinfo  )

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

Parameters:
string   $pathinfo: 
   $path: 


Redefined in descendants as:

[ Top ]
getFileSourcePath  [line 1084]

  string getFileSourcePath( string $base  )

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

Parameters:
string   $base:  Path is relative to this folder


[ Top ]
getFormattedConflicts  [line 4656]

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

Parameters:
mixed   &$element:  parserClass, parserFunction, parserDefine or parserGlobal
string   $type:  type to display. either 'class','function','define' or 'global variable'

API Tags:
Return:  links to conflicting elements, or empty array
Uses:  parserGlobal::getConflicts()
Uses:  parserFunction::getConflicts()
Uses:  parserDefine::getConflicts()
Uses:  parserClass::getConflicts()


[ Top ]
getFormattedDescMethods  [line 4676]

  array getFormattedDescMethods( parserMethod &$element  )

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

Parameters:
parserMethod   &$element: 

API Tags:
Return:  empty array or array(array('link'=>link to method, 'sdesc'=>short description of the method),...)
Uses:  parserMethod::getOverridingMethods()


[ Top ]
getFormattedDescVars  [line 4697]

  array getFormattedDescVars( parserVar &$element  )

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

Parameters:
parserVar   &$element: 

API Tags:
Return:  empty array or array('link'=>link to var, 'sdesc'=>short description of the method
Uses:  parserVar::getOverridingVars()


[ Top ]
getFormattedImplements  [line 4619]

  string getFormattedImplements( parserClass $el  )

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

Parameters:
parserClass   $el:  class variable

API Tags:
Return:  Converter-specific class tree for an individual class
Abstract:  


[ Top ]
getFormattedInheritedConsts  [line 4961]

  array getFormattedInheritedConsts( parserConst $child  )

Return template-enabled list of inherited class constants

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

Parameters:
parserConst   $child:  class constant

API 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()


[ Top ]
getFormattedInheritedMethods  [line 4873]

  array getFormattedInheritedMethods( parserMethod $child  )

Return template-enabled list of inherited methods

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

Parameters:
parserMethod   $child:  class method

API 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()


[ Top ]
getFormattedInheritedVars  [line 4802]

  array getFormattedInheritedVars( parserVar $child  )

Return template-enabled list of inherited variables

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

Parameters:
parserVar   $child:  class var

API 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()


[ Top ]
getFormattedMethodImplements  [line 4735]

  array|false getFormattedMethodImplements( parserMethod &$element  )

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

Parameters:
parserMethod   &$element: 

API Tags:
Return:  array('link'=>link to implemented method, 'sdesc'=>short description
Uses:  parserMethod::getImplements()


[ Top ]
getFormattedOverrides  [line 4718]

  array|false getFormattedOverrides( parserMethod &$element  )

Get the method this method overrides, if any

Parameters:
parserMethod   &$element: 

API Tags:
Return:  array('link'=>link to overridden method, 'sdesc'=>short description
See:  parserMethod::getOverrides()


[ Top ]
getFunctionLink  [line 3186]

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

return false or a functionLink to $expr

Parameters:
string   $expr:  function name
string   $package:  package name
   $file: 
   $text: 

API Tags:
Return:  returns a functionLink or false if the element is not found in package $package
See:  functionLink


Redefined in descendants as:

[ Top ]
getGlobalLink  [line 3234]

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

return false or a globalLink to $expr

Parameters:
string   $expr:  global variable name (with leading $)
string   $package:  package name
   $file: 
   $text: 

API Tags:
Return:  returns a defineLink or false if the element is not found in package $package
See:  defineLink


Redefined in descendants as:

[ Top ]
getGlobalValue  [line 5148]

  string getGlobalValue( string $value  )

Parse a global variable's default value for class initialization.

If a global variable's default value is "new class" as in:

  1.  $globalvar new Parser
This method will document it not as "new Parser" but instead as "new Parser". For examples, see phpdoc.inc. Many global variables are classes, and phpDocumentor links to their documentation

Parameters:
string   $value:  default value of a global variable.

API Tags:
Return:  default global variable value with link to class if it's "new Class"


Redefined in descendants as:

[ Top ]
getHighlightState  [line 589]

  void getHighlightState( )



[ Top ]
getId  [line 3935]

  string getId( abstractLink &$link  )

take abstractLink descendant and text $eltext and return a

unique ID in the format needed for the Converter

Parameters:
abstractLink   &$link: 

API Tags:
Return:  unique identifier of $element
Abstract:  


Redefined in descendants as:

[ Top ]
getIncludeValue  [line 5189]

  string getIncludeValue( string $value, string $ipath  )

Parse an include's file to see if it is a file documented in this project

Although not very smart yet, this method will try to look for the included file file.ext:

  1.  include ("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:

  • absolute path to file
  • ./file.ext or ../file.ext
  • relpath/to/file.ext if relpath is a subdirectory of the base parse directory
For examples, see Setup.inc.php includes. Every include auto-links to the documentation for the file that is included

Parameters:
string   $value:  file included by include statement.
string   $ipath:  path of file that has the include statement

API Tags:
Return:  included file with link to docs for file, if found


[ Top ]
getLink  [line 3548]

  mixed &getLink( string $expr, [string $package = false], [array $packages = false]  )

The meat of the @see tag and inline {@link} tag

$expr is a string with many allowable formats:

  1. proceduralpagename.ext
  2. constant_name
  3. classname::function()
  4. classname::constantname
  5. classname::$variablename
  6. classname
  7. object classname
  8. function functionname()
  9. global $globalvarname
  10. packagename#expr where expr is any of the above

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.

  1.  class myclass
  2.  {
  3.   // from inside the class definition, use "function conflict()" to refer to procedural function "conflict()"
  4.         function conflict()
  5.     {
  6.     }
  7.  }
  8.  
  9.  function conflict()
  10.  {
  11.  }

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

Parameters:
string   $expr:  expression to search for a link
string   $package:  package to start searching in
array   $packages:  list of all packages to search in

API Tags:
Return:  getLink returns a descendant of abstractLink if it finds a link, otherwise it returns a string
See:  pageLink, functionLink, defineLink, classLink, methodLink, varLink
See:  Converter::getPageLink(), Converter::getDefineLink(), Converter::getVarLink(), Converter::getFunctionLink(), Converter::getClassLink()


Redefined in descendants as:

[ Top ]
getMethodLink  [line 3283]

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

return false or a methodLink to $expr in $class

Parameters:
string   $expr:  method name
string   $class:  class name
string   $package:  package name
   $file: 
   $text: 

API Tags:
Return:  returns a methodLink or false if the element is not found in package $package, class $class
See:  methodLink


Redefined in descendants as:

[ Top ]
getPageLink  [line 3258]

  mixed getPageLink( string $expr, string $package, [ $path = false], [ $text = false], [ $packages = false]  )

return false or a pageLink to $expr

Parameters:
string   $expr:  procedural page name
string   $package:  package name
   $path: 
   $text: 
   $packages: 

API Tags:
Return:  returns a pageLink or false if the element is not found in package $package
See:  pageLink


Redefined in descendants as:

[ Top ]
getSortedClassTreeFromClass  [line 2937]

  array getSortedClassTreeFromClass( string $class, string $package, string $subpackage  )

Return a tree of all classes that extend this class

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.

  • link - a classLink to the current class
  • parent - a classLink to the class's parent, or false (except for one special case described below)
  • children - an array of arrays, each entry has a 'class' and 'package' index to the child class, used to find the entry in the big array

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:

  1.  class extends Y
  2.  {
  3.  ...
  4.  }
in this case, the #root entry will be array('link' => classLink to X, 'parent' => 'Y', children => array(...))

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

Parameters:
string   $class:  class name
string   $package: 
string   $subpackage: 

API Tags:
Return:  Format: see docs
See:  HTMLframesConverter::getRootTree()


[ Top ]
getSourceLink  [line 1106]

  string getSourceLink( $path  )

Parameters:
   $path: 

API Tags:
Return:  an output-format dependent link to phpxref-style highlighted source code
Usedby:  parserFileSourceTag::getSourceLink()
Abstract:  


Redefined in descendants as:

[ Top ]
getState  [line 5317]

  void getState( )

Return parserStringWithInlineTags::Convert() cache state


API Tags:
Abstract:  
See:  parserStringWithInlineTags::Convert()


Redefined in descendants as:

[ Top ]
getTutorialId  [line 1404]

  string getTutorialId( $package, $subpackage, $tutorial, $id  )

Return a converter-specific id to distinguish tutorials and their sections

Used by {@id}

Parameters:
   $package: 
   $subpackage: 
   $tutorial: 
   $id: 

API Tags:
Usedby:  parserTocInlineTag::Convert() - retrieve the tutorial ID for
Usedby:  parserIdInlineTag::Convert() - retrieve converter-specific ID


Redefined in descendants as:

[ Top ]
getTutorialLink  [line 3400]

  tutorialLink|string getTutorialLink( string $expr, [string $package = false], [string $subpackage = false], [array $packages = false]  )

The meat of the @tutorial tag and inline {@tutorial} tag

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:

  1.  * @tutorial package/subpackage/file.cls
  2.  * @tutorial package/file.cls
  3.  * @tutorial file.cls

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:

  1. current package/subpackage
  2. all other subpackages of current package
  3. parent package, if this package has classes that extend classes in another package
  4. all other packages

Parameters:
string   $expr:  the original expression
string   $package:  package to look in first
string   $subpackage:  subpackage to look in first
array   $packages:  array of package names to search in if not found in parent packages. This is used to limit the search, phpDocumentor automatically searches all packages

API Tags:
Return:  returns either a link, or the original text, if not found

Information Tags:
Since:  1.2

[ Top ]
getTutorialTree  [line 1960]

  array getTutorialTree( parserTutorial|array $tutorial  )

Get a tree structure representing the hierarchy of tutorials

Returns an array in format:

 array('tutorial' => parserTutorial,
       'kids' => array( // child tutorials
                   array('tutorial' => child parserTutorial,
                         'kids' => array(...)
                        )
                      )
      )

Parameters:
parserTutorial|array   $tutorial: 

Information Tags:
Tutorial:  phpDocumentor Tutorials

Redefined in descendants as:

[ Top ]
getVarLink  [line 3310]

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

return false or a varLink to $expr in $class

Parameters:
string   $expr:  var name
string   $class:  class name
string   $package:  package name
   $file: 
   $text: 

API Tags:
Return:  returns a varLink or false if the element is not found in package $package, class $class
See:  varLink


Redefined in descendants as:

[ Top ]
hasSourceCode  [line 1151]

  boolean hasSourceCode( string $path  )

Determine whether an element's file has generated source code, used for linking to line numbers of source.

Wrapper for $sourcePaths in this version

Parameters:
string   $path:  full path to the source code file


[ Top ]
hasTutorial  [line 491]

  false|parserTutorial hasTutorial( pkg|cls|proc $type, tutorial $name, string $package, [string $subpackage = '']  )

Parameters:
pkg|cls|proc   $type:  the tutorial type to search for
tutorial   $name:  name
string   $package:  package name
string   $subpackage:  subpackage name, if any

API Tags:
Return:  if the tutorial exists, return it


[ Top ]
highlightDocBlockSource  [line 691]

  string highlightDocBlockSource( string $token, string $word, [boolean $preformatted = false]  )

Used to allow converters to format the source code of DocBlocks the way they'd like.

default returns it unchanged. Mainly used by the HighlightParser

Parameters:
string   $token:  name of docblock token type
string   $word:  contents of token
boolean   $preformatted:  whether the contents are preformatted or need modification


[ Top ]
highlightSource  [line 638]

  string highlightSource( integer $token, string $word, [boolean $preformatted = false]  )

Used to allow converters to format the source code the way they'd like.

default returns it unchanged. Mainly used by the HighlightParser

Parameters:
integer   $token:  token value from tokenizer constants
string   $word:  contents of token
boolean   $preformatted:  whether the contents are preformatted or need modification


[ Top ]
highlightTutorialSource  [line 729]

  string highlightTutorialSource( string $token, string $word, [boolean $preformatted = false]  )

Used to allow converters to format the source code of Tutorial XML the way they'd like.

default returns it unchanged. Mainly used by the HighlightParser

Parameters:
string   $token:  name of docblock token type
string   $word:  contents of token
boolean   $preformatted:  whether the contents are preformatted or need modification


[ Top ]
Italicize  [line 946]

  string Italicize( string $para  )

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

Parameters:
string   $para: 

API Tags:
Usedby:  parserI::Convert()


[ Top ]
Kbdize  [line 974]

  string Kbdize( string $para  )

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

Parameters:
string   $para: 

API Tags:
Usedby:  parserKbd::Convert()


[ Top ]
ListItem  [line 875]

  string ListItem( string $item  )

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

Parameters:
string   $item: 

API Tags:
Usedby:  parserList::Convert() - enclose each item of the list


[ Top ]
newSmarty  [line 5013]

  Smarty &newSmarty( )

Return a Smarty template object to operate with

This returns a Smarty template with pre-initialized variables for use. If the method "SmartyInit()" exists, it is called.



[ Top ]
Output  [line 5074]

  void Output( $title  )

do all necessary output

Parameters:
   $title: 

API Tags:
Usedby:  phpDocumentor_IntermediateParser::Convert()
Abstract:  
See:  Converter


Redefined in descendants as:

[ Top ]
postProcess  [line 1017]

  string postProcess( $text  )

This version does nothing

Perform necessary post-processing of string data. For example, the HTML Converters should escape < and > to become &lt; and &gt;

Parameters:
   $text: 

API Tags:
Usedby:  Converter::convertDefine() - on define_value template value, makes it displayable
Usedby:  Converter::convertGlobal() - on global_value template value, makes it displayable


Redefined in descendants as:

[ Top ]
prepareDocBlock  [line 4438]

  array prepareDocBlock( mixed &$element, [array $names = array()], [boolean $nopackage = true]  )

convert the element's DocBlock for output

This function converts all tags and descriptions for output

Parameters:
mixed   &$element:  any descendant of parserElement, or parserData
array   $names:  used to translate tagnames into other tags
boolean   $nopackage:  set to false for pages and classes, the only elements allowed to specify @package

API Tags:
Return:  Format:
 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 ]
      )


Redefined in descendants as:

[ Top ]
PreserveWhiteSpace  [line 904]

  string PreserveWhiteSpace( string $string  )

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

Parameters:
string   $string: 

API Tags:
Usedby:  parserPre::Convert()


[ Top ]
ProgramExample  [line 786]

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

Used to convert the <code> tag in a docblock

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

API Tags:
Usedby:  parserCode::Convert()


Redefined in descendants as:

[ Top ]
returnLink  [line 3912]

  string returnLink( string $link, string $text  )

take URL $link and text $text and return a link in the format needed for the Converter

Parameters:
string   $link:  URL
string   $text:  text to display

API Tags:
Return:  link to $link
Abstract:  


Redefined in descendants as:

[ Top ]
returnSee  [line 3924]

  string returnSee( abstractLink &$link, [string $eltext = false]  )

take abstractLink descendant and text $eltext and return a link

in the format needed for the Converter

Parameters:
abstractLink   &$link: 
string   $eltext: 

API Tags:
Return:  link to $element
Abstract:  


Redefined in descendants as:

[ Top ]
Sampize  [line 988]

  string Sampize( string $para  )

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

Parameters:
string   $para: 

API Tags:
Usedby:  parserSamp::Convert()


[ Top ]
setSourcePaths  [line 1160]

  void setSourcePaths( string $path  )

Mark a file as having had source code highlighted

Parameters:
string   $path:  full path of source file


[ Top ]
setTargetDir  [line 5247]

  void setTargetDir( string $dir  )

Sets the output directory for generated documentation

As of 1.3.0RC6, this also sets the compiled templates directory inside the target directory

Parameters:
string   $dir:  the output directory


Redefined in descendants as:

[ Top ]
setTemplateBase  [line 5085]

  void setTemplateBase( string $base, string $dir  )

Set the template directory with a different template base directory

Parameters:
string   $base:  template base directory
string   $dir:  template name

Information Tags:
Tutorial:  phpDocumentor 1.3.1 Tutorial

[ Top ]
setTemplateDir  [line 5110]

  void setTemplateDir( string $dir  )

sets the template directory based on the $outputformat and $name

Also sets $templateName to the $dir parameter

Parameters:
string   $dir:  subdirectory


Redefined in descendants as:

[ Top ]
sortPageContentsByElementType  [line 2552]

  void sortPageContentsByElementType( &$pages  )

sorts $page_contents by element type as well as alphabetically

Parameters:
   &$pages: 

API Tags:
See:  $sort_page_contents_by_element_type


[ Top ]
sourceLine  [line 1131]

  string sourceLine( integer $linenumber, string $line, [false|string $path = false]  )

Return a line of highlighted source code with formatted line number

If the $path is a full path, then an anchor to the line number will be added as well

Parameters:
integer   $linenumber:  line number
string   $line:  highlighted source code line
false|string   $path:  full path to @filesource file this line is a part of, if this is a single line from a complete file.

API Tags:
Return:  formatted source code line with line number


Redefined in descendants as:

[ Top ]
startHighlight  [line 583]

  void startHighlight( )

Initialize highlight caching



[ Top ]
TranslateEntity  [line 1170]

  void TranslateEntity( string $name  )

Used to translate an XML DocBook entity like &rdquo; from a tutorial by reading the options.ini file for the template.

Parameters:
string   $name:  entity name

API Tags:
Usedby:  parserEntity::Convert() - convert contents to text


[ Top ]
TranslateTag  [line 1200]

  string TranslateTag( string $name, string $attr, string $cdata, string $unconvertedcdata  )

Used to translate an XML DocBook tag from a tutorial by reading the options.ini file for the template.

Parameters:
string   $name:  tag name
string   $attr:  any attributes Format: array(name => value)
string   $cdata:  the tag contents, if any
string   $unconvertedcdata:  the tag contents, if any, unpost-processed

API Tags:
Usedby:  parserXMLDocBookTag::Convert() - Calls this to enclose the contents of the DocBook tag based on the values in template options.ini file


Redefined in descendants as:

[ Top ]
TutorialExample  [line 861]

  void TutorialExample( string $example  )

Parameters:
string   $example: 


Redefined in descendants as:

[ Top ]
type_adjust  [line 760]

  string type_adjust( string $typename  )

Called by parserReturnTag::Convert() to allow converters to change type names to desired formatting

Used by XMLDocBookConverter::type_adjust() to change true and false to the peardoc2 values

Parameters:
string   $typename: 


Redefined in descendants as:

[ Top ]
unmangle  [line 575]

  string unmangle( string $sourcecode  )

Called by parserSourceInlineTag::stringConvert() to allow converters to format the source code the way they'd like.

default returns it unchanged (html with xhtml tags)

Parameters:
string   $sourcecode:  output from highlight_string() - use this function to reformat the returned data for Converter-specific output

API Tags:
Usedby:  parserSourceInlineTag::stringConvert() - remove the extraneous stuff from http://www.php.net/highlight_string
Deprecated:  in favor of tokenizer-based highlighting. This will be removed for 2.0


Redefined in descendants as:

[ Top ]
vardump_tree  [line 2184]

  string vardump_tree( $tree, [ $indent = '']  )

Debugging function for dumping $tutorial_tree

Parameters:
   $tree: 
   $indent: 


[ Top ]
Varize  [line 960]

  string Varize( string $para  )

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

Parameters:
string   $para: 

API Tags:
Usedby:  parserDescVar::Convert()


[ Top ]
walk  [line 1691]

  void walk( array &$pages, array &$package_pages  )

called by phpDocumentor_IntermediateParser::Convert() to traverse the array of pages and their elements, converting them to the output format

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.}}

Parameters:
array   &$pages:  Format: array(fullpath => parserData structure with full parserData::$elements and parserData::$class_elements.
array   &$package_pages:  Format: array(parserPackagePage 1, parserPackagePage 2,...)

API Tags:
Usedby:  phpDocumentor_IntermediateParser::Convert() - passes $pages and $package_pages
Uses:  Converter::_createPkgElements() - sets up $elements and $pkg_elements array, as well as $links


[ Top ]
walk_everything  [line 2249]

  void walk_everything( )

walk over elements by package rather than page

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


API Tags:
See:  Converter::walk()
See:  PDFdefaultConverter


[ Top ]
writeExample  [line 1061]

  void writeExample( string $title, string $path, string $source  )

Write out the formatted source code for an example php file

This function provides the primary functionality for the @example tag.

Parameters:
string   $title:  example title
string   $path:  example filename (no path)
string   $source:  fully highlighted/linked source code of the file

API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
writeFile  [line 5280]

  void writeFile( string $file, string $data, [boolean $binary = false]  )

Writes a file to target dir

Parameters:
string   $file: 
string   $data: 
boolean   $binary:  true if the data is binary and not text


Redefined in descendants as:

[ Top ]
writeSource  [line 1045]

  void writeSource( string $filepath, string $source  )

Write out the formatted source code for a php file

This function provides the primary functionality for the @filesource tag.

Parameters:
string   $filepath:  full path to the file
string   $source:  fully highlighted/linked source code of the file

API Tags:
Usedby:  parserFileSourceTag::writeSource() - export highlighted file source
Abstract:  


Redefined in descendants as:

[ Top ]
_rmdir  [line 5051]

  void _rmdir( string $directory  )

Completely remove a directory and its contents

Parameters:
string   $directory: 


[ Top ]
_setHighlightCache  [line 594]

  void _setHighlightCache( $type, $token  )

Parameters:
   $type: 
   $token: 


[ Top ]
_tutorial_path  [line 2063]

  string _tutorial_path( parserTutorial $pkg, [parserTutorial $subpkg = 0], [parserTutorial $namepkg = 0]  )

Returns the path to this tutorial as a string

Parameters:
parserTutorial   $pkg: 
parserTutorial   $subpkg: 
parserTutorial   $namepkg: 


[ Top ]

Documentation generated on Tue, 24 Oct 2006 09:21:47 -0500 by phpDocumentor 1.3.1