Description
Converter
|
--XMLDocBookpeardoc2Converter
Located in File: /phpDocumentor/Converters/XML/DocBook/peardoc2/XMLDocBookpeardoc2Converter.inc
XML DocBook converter.
This Converter takes output from the Parser and converts it to DocBook output for PEAR documentation.
This Converter differs from the parent DocBook Converter in that it does not recognize the possibility of procedural pages or of functions! All functions must be defined as static methods for namespace purposes. In addition, all constants and global variables for a package are grouped together as per peardoc2 requirements. Include statements are not documented. If you want to document a normal project, don't use the peardoc2 converter, use the DocBook converter.
- author: - Greg Beaver <[email protected]>
- version: - $Id: XMLDocBookpeardoc2Converter.inc 234423 2007-04-24 21:32:15Z ashnazg $
- since: - 1.2
Method Detail
Summary:
XMLDocBookpeardoc2Converter
XMLDocBookpeardoc2Converter
(
&$allp,
&$packp,
&$classes,
&$procpages,
$po,
$pp,
$qm,
$targetDir,
$templateDir,
$title)
string
exampleProgramExample
(
string $example, [
boolean $tutorial =
false], [
$inlinesourceparse =
null], [
$class =
null], [
$linenum =
null], [
$filesourcepath =
null])
mixed
getClassLink
(
string $expr,
string $package, [
string $file =
false], [
boolean $text =
false], [
boolean $local =
true], [
$with_a =
true])
mixed
getDefineLink
(
string $expr,
string $package, [
string $file =
false], [
boolean $text =
false], [
boolean $local =
true])
mixed
getFunctionLink
(
string $expr,
string $package, [
string $file =
false], [
boolean $text =
false], [
boolean $local =
true])
mixed
getGlobalLink
(
string $expr,
string $package, [
string $file =
false], [
boolean $text =
false], [
boolean $local =
true])
string
getId
(
mixed &$el, [
boolean $returnpackage =
false])
void
&getLink
(
$expr, [
$package =
false], [
$packages =
false])
mixed
getMethodLink
(
string $expr,
string $class,
string $package, [
string $file =
false], [
boolean $text =
false], [
boolean $local =
true])
mixed
getPageLink
(
string $expr,
string $package, [
string $path =
false], [
boolean $text =
false], [
boolean $local =
true])
string
getRootTree
(
array $tree,
string $package, [
$noparent =
false],
boolean $nounknownparent)
string
getSourceAnchor
(
string $sourcefile,
string $anchor, [
string $text =
''], [
boolean $link =
false])
void
getTutorialId
(
$package,
$subpackage,
$tutorial,
$id,
$category)
mixed
getVarLink
(
string $expr,
string $class,
string $package, [
string $file =
false], [
boolean $text =
false], [
boolean $local =
true])
void
ProgramExample
(
$listing, [
$tutorial =
false], [
$inlinesourceparse =
null], [
$class =
null], [
$linenum =
null], [
$filesourcepath =
null], [
$origsource =
null])
void
returnSee
(
abstractLink &$element, [
string $eltext =
false], [
boolean $local =
true], [
boolean $with_a =
true])
void
writeFile
(
string $file,
string $data, [
boolean $binary =
false])
Constructor XMLDocBookpeardoc2Converter (line 220)
XMLDocBookpeardoc2Converter XMLDocBookpeardoc2Converter(
&$allp,
&$packp,
&$classes,
&$procpages,
$po,
$pp,
$qm,
$targetDir,
$templateDir,
$title)
sets $base_dir to $targetDir
Parameters
- &$allp:
- &$packp:
- &$classes:
- &$procpages:
- $po:
- $pp:
- $qm:
- $targetDir:
- $templateDir:
- $title:
Info
Method addSummaryToPackageXml (line 345)
void addSummaryToPackageXml(
$template_output)
Parameters
Info
Method Br (line 681)
void Br(
$input)
Overrides : Converter::Br() Used to convert <br> in a docblock
Parameters
Info
Method ConvertErrorLog (line 565)
void ConvertErrorLog(
)
Overrides : Converter::ConvertErrorLog() Convert the phpDocumentor parsing/conversion error log
Create errors.html template file output
This method takes all parsing errors and warnings and spits them out ordered by file and line number.
Info
- global - ErrorTracker $phpDocumentor_errors: We'll be using it's output facility
Method convertFunction (line 937)
void convertFunction(
parserFunction
&$element)
Overrides : Converter::convertFunction() Converts function for template output
Converts function for template output - does nothing in peardoc2!
Parameters
Info
Method convertGlobal (line 1049)
void convertGlobal(
parserGlobal
&$element)
Overrides : Converter::convertGlobal() Converts global variables for template output
Converts global variables for template output
Parameters
Info
Method convertInclude (line 989)
void convertInclude(
parserInclude
&$element)
Overrides : Converter::convertInclude() Converts includes for template output
Converts include elements for template output
Completely ignored by this converter
Parameters
Info
Method convertPackagePage (line 708)
void convertPackagePage(
parserPackagePage
&$element)
Does nothing - use tutorials for DocBook
Parameters
Info
Method convertPage (line 1099)
void convertPage(
parserData
&$element)
Overrides : Converter::convertPage() Default Page Handler
converts procedural pages for template output
Parameters
Info
Method convertVar (line 755)
void convertVar(
parserVar
&$element)
Overrides : Converter::convertVar() Converts class variables for template output.
Does nothing in this converter
Parameters
Info
Method endClass (line 322)
void endClass(
)
Overrides : Converter::endClass() Called by walk() while converting, when the last class element has been parsed.
Writes out the template file of $class_data and unsets the template to save memory
Info
- see - registerCurrentClass()
- see - Converter::endClass()
- todo - move class summary into an array to be written out at the end of parsing each package
Method exampleProgramExample (line 276)
string exampleProgramExample(
string
$example, [boolean
$tutorial = false], [
$inlinesourceparse = null], [
$class = null], [
$linenum = null], [
$filesourcepath = null])
Overrides : Converter::exampleProgramExample() Used to convert the {@example} inline tag in a docblock.
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:
Info
- see - XMLDocBookpeardoc2Converter::exampleProgramExample
Method flushPackageXml (line 353)
void flushPackageXml(
parserClass|false
$element)
Parameters
- parserClass|false $element: is false if this is the end of all conversion
Info
Method formatIndex (line 419)
void formatIndex(
)
Overrides : Converter::formatIndex() Called by walk() while converting.
Does nothing
Info
Method formatLeftIndex (line 440)
void formatLeftIndex(
)
Overrides : Converter::formatLeftIndex() Called by walk() while converting.
Creates package/lang/categoryname/packagename.xml for each package
Info
Method generateElementIndex (line 1378)
void generateElementIndex(
)
does nothing
Info
Method generateFormattedClassTree (line 1124)
array generateFormattedClassTree(
parserClass
$class)
Overrides : Converter::generateFormattedClassTree() returns an array containing the class inheritance tree from the root object to the class.
returns an array containing the class inheritance tree from the root object to the class
Parameters
Info
Method generateFormattedClassTrees (line 1201)
void generateFormattedClassTrees(
string
$package)
returns a template-enabled array of class trees
Parameters
- string $package: package to generate a class tree for
Info
- see - $roots, HTMLConverter::getRootTree()
Method generateFormattedInterfaceTrees (line 1255)
void generateFormattedInterfaceTrees(
string
$package)
returns a template-enabled array of interface inheritance trees
Parameters
- string $package: package to generate a class tree for
Info
- see - $roots, HTMLConverter::getRootTree()
Method generatePkgElementIndex (line 1394)
void generatePkgElementIndex(
string
$package)
Generate alphabetical index of all elements by package and subpackage
Parameters
- string $package: name of a package
Info
Method generatePkgElementIndexes (line 1402)
void generatePkgElementIndexes(
)
Info
Method getCData (line 686)
void getCData(
$value)
Parameters
Info
Method getClassLink (line 1415)
mixed getClassLink(
string
$expr, string
$package, [string
$file = false], [boolean
$text = false], [boolean
$local = true], [
$with_a = true])
Overrides : Converter::getClassLink() return false or a classLink to $expr
Parameters
- string $expr: name of class
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
- boolean $local: return just the URL, or enclose it in an html a tag
- $with_a:
Info
Method getDefineLink (line 1447)
mixed getDefineLink(
string
$expr, string
$package, [string
$file = false], [boolean
$text = false], [boolean
$local = true])
Overrides : Converter::getDefineLink() return false or a defineLink to $expr
Parameters
- string $expr: name of define
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
- boolean $local: return just the URL, or enclose it in an html a tag
Info
Method getExampleLink (line 290)
void getExampleLink(
$unused,
$title)
Parameters
Info
Method getFunctionLink (line 1431)
mixed getFunctionLink(
string
$expr, string
$package, [string
$file = false], [boolean
$text = false], [boolean
$local = true])
Overrides : Converter::getFunctionLink() return false or a functionLink to $expr
Parameters
- string $expr: name of function
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
- boolean $local: return just the URL, or enclose it in an html a tag
Info
Method getGlobalLink (line 1463)
mixed getGlobalLink(
string
$expr, string
$package, [string
$file = false], [boolean
$text = false], [boolean
$local = true])
Overrides : Converter::getGlobalLink() return false or a globalLink to $expr
Parameters
- string $expr: name of global variable
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
- boolean $local: return just the URL, or enclose it in an html a tag
Info
Method getId (line 513)
string getId(
mixed
&$el, [boolean
$returnpackage = false])
Overrides : Converter::getId() take abstractLink descendant and text $eltext and return a
Get the id value needed to allow linking
Parameters
- mixed &$el: descendant of parserElement or parserData/parserPage
- boolean $returnpackage: true to return the id for the package page
Info
Method getLink (line 237)
void &getLink(
$expr, [
$package = false], [
$packages = false])
Overrides : Converter::getLink() The meat of the @see tag and inline {@link} tag
do that stuff in $template_options
Parameters
- $expr:
- $package:
- $packages:
Info
Method getMethodLink (line 1496)
mixed getMethodLink(
string
$expr, string
$class, string
$package, [string
$file = false], [boolean
$text = false], [boolean
$local = true])
Overrides : Converter::getMethodLink() return false or a methodLink to $expr in $class
Parameters
- string $expr: name of method
- string $class: class containing method
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
- boolean $local: return just the URL, or enclose it in an html a tag
Info
Method getPageLink (line 1479)
mixed getPageLink(
string
$expr, string
$package, [string
$path = false], [boolean
$text = false], [boolean
$local = true])
Overrides : Converter::getPageLink() return false or a pageLink to $expr
Parameters
- string $expr: name of procedural page
- string $package: package name
- string $path: full path to look in (used in index generation)
- boolean $text: deprecated
- boolean $local: return just the URL, or enclose it in an html a tag
Info
Method getPageName (line 1111)
void getPageName(
&$element)
Parameters
Info
Method getRootTree (line 1312)
string getRootTree(
array
$tree, string
$package, [
$noparent = false], boolean
$nounknownparent)
return formatted class tree for the Class Trees page
Parameters
- array $tree: output from getSortedClassTreeFromClass()
- string $package: package
- boolean $nounknownparent: if true, an object's parent will not be checked
- $noparent:
Info
Method getSourceAnchor (line 676)
string getSourceAnchor(
string
$sourcefile, string
$anchor, [string
$text = ''], [boolean
$link = false])
Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag.
Parameters
- string $sourcefile: full path to source file
- string $anchor: name of anchor
- string $text: link text, if this is a link
- boolean $link: returns either a link or a destination based on this parameter
Info
- return - link to an anchor, or the anchor
Method getTutorialId (line 656)
void getTutorialId(
$package,
$subpackage,
$tutorial,
$id,
$category)
Overrides : Converter::getTutorialId() Return a converter-specific id to distinguish tutorials and their sections
Parameters
- $package:
- $subpackage:
- $tutorial:
- $id:
- $category:
Info
Method getVarLink (line 1513)
mixed getVarLink(
string
$expr, string
$class, string
$package, [string
$file = false], [boolean
$text = false], [boolean
$local = true])
Overrides : Converter::getVarLink() return false or a varLink to $expr in $class
Parameters
- string $expr: name of var
- string $class: class containing var
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
- boolean $local: return just the URL, or enclose it in an html a tag
Info
Method makeLeft (line 405)
void makeLeft(
)
Info
Method Output (line 1575)
void Output(
)
Overrides : Converter::Output() do all necessary output
Generate the constants.xml, packagename.xml, and globals.xml files
Info
Method prepareDocBlock (line 631)
void prepareDocBlock(
&$element, [
$nopackage = true])
Overrides : Converter::prepareDocBlock() convert the element's DocBlock for output
Parameters
Info
Method ProgramExample (line 691)
void ProgramExample(
$listing, [
$tutorial = false], [
$inlinesourceparse = null], [
$class = null], [
$linenum = null], [
$filesourcepath = null], [
$origsource = null])
Overrides : Converter::ProgramExample() Used to convert the <code> tag in a docblock
Parameters
- $listing:
- $tutorial:
- $inlinesourceparse:
- $class:
- $linenum:
- $filesourcepath:
- $origsource:
Info
Method rcNatCmp (line 1527)
int rcNatCmp(
mixed
$a, mixed
$b)
does a nat case sort on the specified second level value of the array
Parameters
Info
Method rcNatCmp1 (line 1543)
int rcNatCmp1(
mixed
$a, mixed
$b)
does a nat case sort on the specified second level value of the array.
this one puts constructors first
Parameters
Info
Method returnLink (line 400)
string returnLink(
string
$link, string
$text)
Overrides : Converter::returnLink() take URL $link and text $text and return a link in the format needed for the Converter
Parameters
- string $link:
- string $text:
Info
- return - <ulink url="'.$link.'">'.$text.'</ulink>
Method returnSee (line 453)
void returnSee(
abstractLink
&$element, [string
$eltext = false], [boolean
$local = true], [boolean
$with_a = true])
Overrides : Converter::returnSee() take abstractLink descendant and text $eltext and return a link
This function takes an abstractLink descendant and returns an html link
Parameters
- abstractLink &$element: a descendant of abstractlink should be passed, and never text
- string $eltext: text to display in the link
- boolean $local: this parameter is not used, and is deprecated
- boolean $with_a: determines whether the returned text is enclosed in an <link> tag
Info
Method setTemplateDir (line 1382)
void setTemplateDir(
$dir)
Overrides : Converter::setTemplateDir() sets the template directory based on the $outputformat and $name
Parameters
Info
Method wordwrap (line 1567)
void wordwrap(
$string)
Parameters
Info
Method writeExample (line 285)
void writeExample(
$title,
$path,
$source)
Overrides : Converter::writeExample() Write out the formatted source code for an example php file
Parameters
Info
Method writeFile (line 254)
void writeFile(
string
$file, string
$data, [boolean
$binary = false])
Overrides : Converter::writeFile() Writes a file to target dir
Writes a file to target dir, beautify any .xml files first
Parameters
- string $file: filename
- string $data: file contents
- boolean $binary: true if the data is binary and not text
Info
Method writeNewPPage (line 426)
void writeNewPPage(
$key)
Does nothing
Parameters
Info
Method writeSource (line 433)
void writeSource(
)
Overrides : Converter::writeSource() Write out the formatted source code for a php file
Does nothing
Info