PHP_UML
[ class tree: PHP_UML ] [ index: PHP_UML ] [ all elements ]

Class: PHP_UML_PHP_Parser

Source Location: /PHP_UML-1.0.1/UML/PHP/Parser.php

Class Overview


The PHP parser.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 36]
The PHP parser.

It stores all the program elements of a PHP file in a PHP_UML_Metamodel_Superstructure object.

It relies the PHP instruction token_get_all(). Most navigabilities between associated elements are bidirectional (the packages know their owned elements, and the classes know their nesting package) In a first step, relations (extends, implements) use strings. It means that the namespace of a class is memorized through a string. Once the parsing is done, the method finalize() must be called, so that all the named references be replaced by PHP references (&$xxx).



[ Top ]


Class Variables

$model =

[line 49]

Reference to a PHP_UML_Metamodel_Superstructure

(where the parser stores all the program elements it finds)

  • Access: public



[ Top ]



Method Detail

parse   [line 157]

void parse( string $fileBase, string $filePath)

Parse a PHP file
  • Access: public

Parameters:

string   $fileBase     Base directory
string   $filePath     Pathfile (relative to $fileBase)

[ Top ]

__construct (Constructor)   [line 136]

PHP_UML_PHP_Parser __construct( PHP_UML_Metamodel_Superstructure &$model, [bool $docblocks = true], [bool $dollar = true], [bool $internal = true], [bool $onlyApi = false])

Constructor
  • Access: public

Parameters:

PHP_UML_Metamodel_Superstructure   &$model     The instance of metamodel to fill
bool   $docblocks     Set to true to interpret docblocks (@package, types)
bool   $dollar     Set to true to keep the symbol $ in variable names
bool   $internal     Set to true to skip elements tagged with @internal
bool   $onlyApi     Set to true to include only the elements tagged with @api

[ Top ]


Documentation generated on Thu, 27 Aug 2009 17:30:08 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.