Intermediate class parsing structure.
The phpDocumentor_IntermediateParser class uses this class and its cousin, ProceduralPages to organize all parsed source code elements. Data is fed to each immediately after it is parsed, and at conversion time, everything is organized.
The Classes class is responsible for all inheritance, including resolving name conflicts between classes, determining which classes extend other classes, and is responsible for all inheritance of documentation.
Located in /phpDocumentor/Classes.inc [line 70 ]
Author(s):void addClass(
parserClass
&$element
)
While parsing, add a class to the list of parsed classes
sets up the $classesbyfile, $classesbynamefile, $extendsbyfile, $classchildrenbyfile, $roots arrays, and sets $curclass
Parameters:void addConst(
parserConst
&$element
)
While parsing, add a variable to the list of parsed variables
sets up the $constsbyfile array using $curfile and $curclass
Parameters:void addMethod(
parserMethod
&$element
)
While parsing, add a method to the list of parsed methods
sets up the $methodsbyfile array using $curfile and $curclass
Parameters:void addPackageToFile(
string
$package
)
Mark a package as being used in a class
void addVar(
parserVar
&$element
)
While parsing, add a variable to the list of parsed variables
sets up the $varsbyfile array using $curfile and $curclass
Parameters:parserClass &getClass(
string
$class, string
$file
)
Get the parserClass representation of a class from its name and file
Parameters:mixed &getClassByPackage(
string
$class, string
$package
)
Search for a class in a package
Parameters:mixed getClassesInPath(
string
$path
)
Used by parserData::getClasses() to retrieve classes defined in file $path
retrieves the array entry from $classesbyfile for $path
Parameters:mixed getConflicts(
mixed
$class
)
If a package contains two classes with the same name, this function finds that conflict
Returns the $classconflicts entry for class $class, minus its own path
Parameters:mixed getDefiniteChildren(
string
$parclass, string
$file
)
Get all classes confirmed in parsing to be descended class $parclass in file $file
Parameters:mixed getParentClass(
string
$class, string
$file
)
Find the parent class of a class in file $file
uses 3 tests to find the parent classname:
array getRoots(
[boolean
$all = false]
)
Get a list of all root classes indexed by package. Used to generate class trees by Converter
Parameters:void Inherit(
phpDocumentor_IntermediateParser
&$render
)
Main processing engine for setting up class inheritance.
This function uses $roots to traverse the inheritance tree via processChild() and returns the data structures phpDocumentor_IntermediateParser needs to convert parsed data to output using phpDocumentor_IntermediateParser::Convert()
Parameters:void nextFile(
string
$file
)
Prepare to parse a new file
sets $curfile to $file and $curclass to false (no class being parsed)
Parameters:void processChild(
phpDocumentor_IntermediateParser
&$render, string
$class, string
$file, [boolean
$furb = false]
)
This function recursively climbs up the class tree, setting inherited information like package and adds the elements to phpDocumentor_IntermediateParser.
Using structures defined in Classes, the function first sets package information, and then seeks out child classes. It uses 3 tests to determine whether a class is a child class.
void setClassParent(
string
$class, string
$file
)
Find the parent class of $class, and set up structures to note this fact
Modifies the parserClass element in $classesbyfile to use the parent's package, and inherit methods/vars
Parameters: