Located in File: /phpDocumentor/ProceduralPages.inc
This structure parses defines, functions, and global variables by file, and then iterates over the elements to document conflicts.
$curfile (line 67)
$defineconflicts = array() (line 314)
Format:
array(
functionname => array(
full path,
full path,
...
)
)
$definesbyfile = array() (line 157)
Format:
array(
full path => array(
definename => parserDefine
)
)
$definesbynamefile = array() (line 211)
This structure is designed to handle name conflicts. Two files can contain defines with the same name, and this array will record both filenames to help control namespace errors Format:
array(
definename => array(
full path of file containing definename,
full path of file 2 containing definename,
...
)
)
$functionconflicts = array() (line 282)
Format:
array(
functionname => array(
full path,
full path,
...
)
)
$functionsbyfile = array() (line 142)
Format:
array(
full path => array(
functionname => parserFunction
)
)
$functionsbynamefile = array() (line 192)
This structure is designed to handle name conflicts. Two files can contain functions with the same name, and this array will record both filenames to help control namespace errors Format:
array(
functionname => array(
full path of file containing functionname,
full path of file 2 containing functionname,
...
)
)
$globalconflicts = array() (line 330)
Format:
array(
functionname => array(
full path,
full path,
...
)
)
$globalsbyfile = array() (line 172)
Format:
array(
full path => array(
globalname => parserGlobal
)
)
$globalsbynamefile = array() (line 231)
This structure is designed to handle name conflicts. Two files can contain global variables with the same name, and this array will record both filenames to help control namespace errors Format:
array(
global variablename => array(
full path of file containing global variablename,
full path of file 2 containing global variablename,
...
)
)
$ignorepages = array() (line 100)
that have been ignored via -po or @access private or @ignore Format:
array(
name => array(
fullpath => parserPage,
fullpath => parserPage2 [if there are name conflicts],
...
)
)
$includesbyfile = array() (line 127)
Format:
array(
full path => array(
includename => parserInclude
)
)
$pageclasspackages = array() (line 266)
Format:
array(
fullpath => array(
packagename => array(
subpackagename => 1,
subpackagename => 1,
..
),
packagename2 => array(...
)
)
)
$pageconflicts = array() (line 298)
Format:
array(
pagename => array(
fullpath,
fullpath,
...
)
)
$pagepackages = array() (line 246)
Format:
array(
fullpath => array(
packagename,
subpackagename
)
)
$pages = array() (line 83)
Format:
array(
name => array(
fullpath => parserPage,
fullpath => parserPage2 [if there are name conflicts],
...
)
)
$pathpages = array() (line 112)
Format:
array(
fullpath => name
)
Method addClassPackageToFile (line 613)
Method addDefine (line 552)
Method addFunction (line 508)
Method addGlobal (line 530)
Method addInclude (line 496)
Method addPage (line 349)
Method addPagePackage (line 450)
changes package in both the $pages array and the pagepackages array
Method getPathInfo (line 385)
Method getRealPath (line 1033)
Method ignorePage (line 368)
Method pathMatchesParsedFile (line 983)
Method replaceElement (line 575)
Method setName (line 421)
This function is used to handle a @name tag in a page-level DocBlock
Method setParseBase (line 969)
Method setupPagePackages (line 628)
helps with -po to avoid dumb bugs
Method setupPages (line 911)
Automatic linking requires that each linkable name have exactly one element associated with it. In other words, there cannot be two functions named foo() in the same package.
This also adheres to php rules with one exception:
phpDocumentor is not aware of conditional control structures because it would slow things down considerably. So, what phpDocumentor does is automatically ignore the second define and raise a warning. The warning can be eliminated with an @ignore tag on the second element like so:
If there are two files that contain the same procedural elements in the same package (for example, a common configuration file common.php), they will also be ignored as if they were in the same file. The reasoning behind this is simple. A package is an indivisible set of files and classes that a user will include in their code. Name conflicts must be avoided to allow successful execution.
This function also plays the all-important role of calling phpDocumentor_IntermediateParser::addElementToPage() in order to add processed elements to their pages for Conversion.