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

Class: PHP_UML_PHP_Parser

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

Class Overview


The PHP parser.


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.

You should not use it directly by yourself. Use PHP_UML instead.

It relies a lot on regular expressions. Most navigabilities between associated elements are bidirectional (the packages know their owned elements, and the classes know their nesting package) At first, relations use string references (the name of the element). Once the parsing is completed, the method finalize() must be called, so that the named references be replaced by PHP references (&$xxx).



[ Top ]


Class Variables

$model =

[line 54]

Reference to a PHP_UML_Metamodel_Superstructure (where the parser stores all the program elements it finds)
  • Access: public



[ Top ]



Method Detail

__construct (Constructor)   [line 97]

PHP_UML_PHP_Parser __construct( string $root, [bool $docblocks = true], [bool $dollar = true])

Constructor
  • Access: public

Parameters:

string   $root   —  Root package name
bool   $docblocks   —  True = docblocks are scanned
bool   $dollar   —  True = $ in variables is kept

[ Top ]

parse   [line 113]

void parse( string $fileBase, string $filePath)

Parses a PHP file
  • Access: public

Parameters:

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:22:53 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.