Description
Converter
|
--HTMLSmartyConverter
Located in File: /phpDocumentor/Converters/HTML/Smarty/HTMLSmartyConverter.inc
HTML output converter.
This Converter takes output from the Parser and converts it to HTML-ready output for use with Smarty.
Method Detail
Summary:
HTMLSmartyConverter
HTMLSmartyConverter
(
&$allp,
&$packp,
&$classes,
&$procpages,
$po,
$pp,
$qm,
$targetDir,
$templateDir,
$title)
void
Convert_RIC
(
README|INSTALL|CHANGELOG $name,
string $contents)
mixed
getClassLink
(
string $expr,
string $package, [
string $file =
false], [
boolean $text =
false], [
boolean $with_a =
true])
mixed
getConstLink
(
string $expr,
string $class,
string $package, [
string $file =
false], [
boolean $text =
false],
boolean 5)
mixed
getDefineLink
(
string $expr,
string $package, [
string $file =
false], [
boolean $text =
false],
boolean 4)
mixed
getFunctionLink
(
string $expr,
string $package, [
string $file =
false], [
boolean $text =
false],
boolean 4)
mixed
getGlobalLink
(
string $expr,
string $package, [
string $file =
false], [
boolean $text =
false],
boolean 4)
void
getId
(
$element, [
$fullpath =
true])
mixed
getMethodLink
(
string $expr,
string $class,
string $package, [
string $file =
false], [
boolean $text =
false],
boolean 5)
mixed
getPageLink
(
string $expr,
string $package, [
string $path =
false], [
boolean $text =
false],
boolean 4)
string
getRootTree
(
array $tree,
string $package, [
$noparent =
false],
boolean $nounknownparent)
string
getSourceAnchor
(
string $sourcefile,
string $anchor, [
string $text =
''], [
boolean $link =
false])
mixed
getVarLink
(
string $expr,
string $class,
string $package, [
string $file =
false], [
boolean $text =
false],
boolean 5)
string
ProgramExample
(
string $example, [
boolean $tutorial =
false], [
$inlinesourceparse =
null], [
$class =
null], [
$linenum =
null], [
$filesourcepath =
null])
string
sourceLine
(
integer $linenumber,
string $line, [
false|string $path =
false])
Constructor HTMLSmartyConverter (line 148)
HTMLSmartyConverter HTMLSmartyConverter(
&$allp,
&$packp,
&$classes,
&$procpages,
$po,
$pp,
$qm,
$targetDir,
$templateDir,
$title)
Parameters
- &$allp:
- &$packp:
- &$classes:
- &$procpages:
- $po:
- $pp:
- $qm:
- $targetDir:
- $templateDir:
- $title:
Info
Method convertConst (line 1106)
void convertConst(
parserDefine
&$element)
Overrides : Converter::convertConst() Converts class constants for template output.
Converts class variables for template output
Parameters
Info
Method ConvertErrorLog (line 928)
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 convertGlobal (line 1157)
void convertGlobal(
parserGlobal
&$element)
Overrides : Converter::convertGlobal() Converts global variables for template output
Converts global variables for template output
Parameters
Info
Method convertMethod (line 1116)
void convertMethod(
parserDefine
&$element)
Overrides : Converter::convertMethod() Converts method for template output
Converts class methods for template output
Parameters
Info
Method convertPackagepage (line 1004)
void convertPackagepage(
parserPackagePage
&$element)
Converts package page and sets its package as used in $package_pages
Parameters
Info
Method convertPage (line 1167)
void convertPage(
parserData
&$element)
Overrides : Converter::convertPage() Default Page Handler
converts procedural pages for template output
Parameters
Info
Method convertVar (line 1096)
void convertVar(
parserDefine
&$element)
Overrides : Converter::convertVar() Converts class variables for template output.
Converts class variables for template output
Parameters
Info
Method Convert_RIC (line 872)
void Convert_RIC(
README|INSTALL|CHANGELOG
$name, string
$contents)
Overrides : Converter::Convert_RIC() Convert README/INSTALL/CHANGELOG file contents to output format
Convert README/INSTALL/CHANGELOG file contents to output format
Parameters
- README|INSTALL|CHANGELOG $name:
- string $contents: contents of the file
Info
Method copyMediaRecursively (line 1604)
void copyMediaRecursively(
$media,
$targetdir, [
$subdir = ''])
Parameters
- $media:
- $targetdir:
- $subdir:
Info
Method endClass (line 344)
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
Method endPage (line 523)
void endPage(
)
Overrides : Converter::endPage() Called by walk() while converting, when the last procedural page element has been parsed.
Writes out the template file of $page_data and unsets the template to save memory
Info
Method formatIndex (line 642)
void formatIndex(
)
Overrides : Converter::formatIndex() Called by walk() while converting.
HTMLdefaultConverter uses this function to format template index.html and packages.html
This function generates the package list from $all_packages, eliminating any packages that don't have any entries in their package index (no files at all, due to @ignore or other factors). Then it uses the default package name as the first package index to display. It sets the right pane to be either a blank file with instructions on making package-level docs, or the package-level docs for the default package.
Info
- global - string $phpDocumentor_DefaultPackageName: Used to set the starting package to display
Method formatLeftIndex (line 740)
void formatLeftIndex(
)
Overrides : Converter::formatLeftIndex() Called by walk() while converting.
Generate indexes for li_package.html and classtree output files
This function generates the li_package.html files from the template file left.html. It does this by iterating through each of the $page_elements, $class_elements and $function_elements arrays to retrieve the pre-sorted abstractLink descendants needed for index generation. Conversion of these links to text is done by returnSee().
Then it uses generateFormattedClassTrees() to create class trees from the template file classtrees.html. Output filename is classtrees_packagename.html. This function also unsets $elements and $pkg_elements to free up the considerable memory these two class vars use
Info
Method formatPkgIndex (line 606)
void formatPkgIndex(
)
Overrides : Converter::formatPkgIndex() Called by walk() while converting.
HTMLdefaultConverter chooses to format both package indexes and the complete index here
This function formats output for the elementindex.html and pkgelementindex.html template files. It then writes them to the target directory
Info
Method formatTutorialTOC (line 321)
string formatTutorialTOC(
array
$toc)
Overrides : Converter::formatTutorialTOC() Creates a table of contents for a {@toc} inline tag in a tutorial
Use the template tutorial_toc.tpl to generate a table of contents for HTML
Parameters
- array $toc: format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...)
Info
- return - table of contents formatted for use in the current output format
Method generateElementIndex (line 1571)
void generateElementIndex(
)
Generate alphabetical index of all elements
Info
Method generateFormattedClassTree (line 1195)
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 1259)
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 1313)
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 1669)
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 1719)
void generatePkgElementIndexes(
)
Info
Method getCData (line 990)
void getCData(
$value)
Parameters
Info
Method getClassContents (line 466)
void getClassContents(
)
Info
Method getClassLeft (line 436)
void getClassLeft(
)
Info
Method getClassLink (line 1759)
mixed getClassLink(
string
$expr, string
$package, [string
$file = false], [boolean
$text = false], [boolean
$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 $with_a: return just the URL, or enclose it in an html a tag
Info
Method getConstLink (line 1874)
mixed getConstLink(
string
$expr, string
$class, string
$package, [string
$file = false], [boolean
$text = false], boolean
5)
Overrides : Converter::getConstLink() return false or a constLink to $expr in $class
Parameters
- boolean 5: return just the URL, or enclose it in an html a tag
- string $expr: name of class constant
- string $class: class containing class constant
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
Info
Method getDefineLink (line 1791)
mixed getDefineLink(
string
$expr, string
$package, [string
$file = false], [boolean
$text = false], boolean
4)
Overrides : Converter::getDefineLink() return false or a defineLink to $expr
Parameters
- boolean 4: return just the URL, or enclose it in an html a tag
- string $expr: name of define
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
Info
Method getExampleLink (line 190)
void getExampleLink(
$path,
$title)
Parameters
Info
Method getFunctionLink (line 1775)
mixed getFunctionLink(
string
$expr, string
$package, [string
$file = false], [boolean
$text = false], boolean
4)
Overrides : Converter::getFunctionLink() return false or a functionLink to $expr
Parameters
- boolean 4: return just the URL, or enclose it in an html a tag
- string $expr: name of function
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
Info
Method getGlobalLink (line 1807)
mixed getGlobalLink(
string
$expr, string
$package, [string
$file = false], [boolean
$text = false], boolean
4)
Overrides : Converter::getGlobalLink() return false or a globalLink to $expr
Parameters
- boolean 4: return just the URL, or enclose it in an html a tag
- string $expr: name of global variable
- string $package: package name
- string $file: full path to look in (used in index generation)
- boolean $text: deprecated
Info
Method getId (line 814)
void getId(
$element, [
$fullpath = true])
Overrides : Converter::getId() take abstractLink descendant and text $eltext and return a
Parameters
Info
Method getIndexInformation (line 1453)
array getIndexInformation(
parserElement
$elt)
Generate indexing information for given element
Parameters
Info
Method getMethodLink (line 1840)
mixed getMethodLink(
string
$expr, string
$class, string
$package, [string
$file = false], [boolean
$text = false], boolean
5)
Overrides : Converter::getMethodLink() return false or a methodLink to $expr in $class
Parameters
- boolean 5: return just the URL, or enclose it in an html a tag
- 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
Info
Method getPageContents (line 482)
void getPageContents(
)
Info
Method getPageLeft (line 499)
void getPageLeft(
)
Info
Method getPageLink (line 1823)
mixed getPageLink(
string
$expr, string
$package, [string
$path = false], [boolean
$text = false], boolean
4)
Overrides : Converter::getPageLink() return false or a pageLink to $expr
Parameters
- boolean 4: return just the URL, or enclose it in an html a tag
- string $expr: name of procedural page
- string $package: package name
- string $path: full path to look in (used in index generation)
- boolean $text: deprecated
Info
Method getPageName (line 1181)
void getPageName(
&$element)
Parameters
Info
Method getRootTree (line 1370)
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 211)
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 995)
void getTutorialId(
$package,
$subpackage,
$tutorial,
$id)
Overrides : Converter::getTutorialId() Return a converter-specific id to distinguish tutorials and their sections
Parameters
- $package:
- $subpackage:
- $tutorial:
- $id:
Info
Method getTutorialList (line 369)
void getTutorialList(
)
Info
Method getTutorialTree (line 396)
void getTutorialTree(
$tutorial, [
$k = false])
Overrides : Converter::getTutorialTree() Get a tree structure representing the hierarchy of tutorials
Parameters
Info
Method getVarLink (line 1857)
mixed getVarLink(
string
$expr, string
$class, string
$package, [string
$file = false], [boolean
$text = false], boolean
5)
Overrides : Converter::getVarLink() return false or a varLink to $expr in $class
Parameters
- boolean 5: return just the URL, or enclose it in an html a tag
- 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
Info
Method makeLeft (line 554)
void makeLeft(
)
Info
Method Output (line 1931)
void Output(
)
Overrides : Converter::Output() do all necessary output
This function is not used by HTMLdefaultConverter, but is required by Converter
Info
Method postProcess (line 307)
void postProcess(
$text)
Overrides : Converter::postProcess() This version does nothing
Uses htmlspecialchars() on the input
Parameters
Info
Method ProgramExample (line 255)
string ProgramExample(
string
$example, [boolean
$tutorial = false], [
$inlinesourceparse = null], [
$class = null], [
$linenum = null], [
$filesourcepath = null])
Overrides : Converter::ProgramExample() Used to convert the <code> tag in a docblock
Used to convert the <code> tag in a docblock
Parameters
- string $example:
- boolean $tutorial:
- $inlinesourceparse:
- $class:
- $linenum:
- $filesourcepath:
Info
Method rcNatCmp (line 1888)
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 1904)
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 549)
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 - <a href="'.$link.'">'.$text.'</a>
Method returnSee (line 784)
void returnSee(
abstractLink
&$element, [string
$eltext = false], [boolean
$with_a = true], boolean
3)
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
- boolean 3: determines whether the returned text is enclosed in an <a> tag
- abstractLink &$element: a descendant of abstractlink should be passed, and never text
- string $eltext: text to display in the link
- boolean $with_a: this parameter is not used, and is deprecated
Info
Method setTargetDir (line 1649)
void setTargetDir(
$dir)
Overrides : Converter::setTargetDir() Sets the output directory for generated documentation
calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied
Parameters
Info
Method SmartyInit (line 328)
void &SmartyInit(
&$templ)
Parameters
Info
Method sourceLine (line 232)
string sourceLine(
integer
$linenumber, string
$line, [false|string
$path = false])
Overrides : Converter::sourceLine() Return a line of highlighted source code with formatted line number
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.
Info
- return - formatted source code line with line number
Method TutorialExample (line 273)
void TutorialExample(
string
$example)
Overrides : Converter::TutorialExample() parent method not documented
Parameters
Info
Method writeExample (line 172)
void writeExample(
$title,
$path,
$source)
Overrides : Converter::writeExample() Write out the formatted source code for an example php file
Parameters
Info
Method writeNewPPage (line 706)
void writeNewPPage(
$key)
Parameters
Info
Method writeRIC (line 878)
void writeRIC(
)
Info
Method writeSource (line 154)
void writeSource(
$path,
$value)
Overrides : Converter::writeSource() Write out the formatted source code for a php file
Parameters
Info