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

Class: PHP_UML

Source Location: /PHP_UML-0.4.2/UML.php

Class Overview

PHP_UML_Scanner
   |
   --PHP_UML

The main class to instantiate


Variables

Methods


Inherited Variables

Inherited Methods

Class: PHP_UML_Scanner

PHP_UML_Scanner::traverseDirectory()
Traverse recursively the directories for files to parse

Class Details

[line 91]
The main class to instantiate


[ Top ]


Class Variables

$acceptedExtensions = array('php')

[line 101]

Extensions of files to scan
  • Access: public

Type:   Array


[ Top ]

$componentView =  true

[line 121]

A component view is created at the root level, enclosing the whole scanned

file system. Each file produces an component

  • Access: public

Type:   bool


[ Top ]

$deploymentView =  true

[line 114]

A deployment view is created at the root level, enclosing the whole scanned

file system. Each file produces an artifact

  • Access: public

Type:   bool


[ Top ]

$docblocks =  true

[line 128]

Docblocks are read (package, param and return) : class, function and file

docblocks

  • Access: public

Type:   bool


[ Top ]

$dollar =  true

[line 134]

Keep the PHP variable prefix $
  • Access: public

Type:   bool


[ Top ]

$model =

[line 142]

A reference to a PHP_UML_Metamodel_Superstructure object Either parseFile() or parserDirectory() fill it, once their job is done.

Or you can set it yourself with a user-defined instance of superstructure.

  • Access: public



[ Top ]

$tagFilename =  true

[line 107]

Filenames are added to classes and interfaces
  • Access: public

Type:   bool


[ Top ]



Method Detail

addPackage   [line 429]

void addPackage( PHP_UML_Metamodel_Package $package, [bool $stripTag = false], [string $id = ''])

Traverses all packages, and adds recursively the elements found to the "xmi" string property.
  • Access: protected

Parameters:

PHP_UML_Metamodel_Package   $package   —  New package to traverse
bool   $stripTag   —  Omit package XMI tag
string   $id   —  Identifier

[ Top ]

atFile   [line 381]

void atFile( int $level, string $filePath)

Function executed each time a new file is scanned
  • Access: protected

Parameters:

int   $level   —  Directories recursion level
string   $filePath   —  Current file path

[ Top ]

atFolderIn   [line 405]

void atFolderIn( int $level, string $dir)

Enters a new folder
  • Access: protected

Parameters:

int   $level   —  Level of recursion
string   $dir   —  Name of folder

[ Top ]

atFolderOut   [line 416]

void atFolderOut( int $level, string $dir)

Exits a folder
  • Access: protected

Parameters:

int   $level   —  Level of recursion
string   $dir   —  Name of folder

[ Top ]

__construct (Constructor)   [line 192]

PHP_UML __construct( )

Constructor
  • Access: public

[ Top ]

generateXMI   [line 282]

void generateXMI( [float $version = 2.1], [string $xmlEncoding = 'iso-8859-1'])

XMI Generator Generates XMI corresponding to the PHP model stored in $this->model.

If you need to use this XMI Generator without any previous PHP parsing, simply set $this->model with a proper PHP_UML_Metamodel_Superstructure object

  • Access: public

Parameters:

float   $version   —  XMI Version For XMI 1.x, any value below 2. For XMI 2.x, any value above or equal to 2.
string   $xmlEncoding   —  XML Encoding

[ Top ]

parseDirectory   [line 239]

void parseDirectory( mixed $path, [string $model = 'default'])

Parse a PHP file, and builds the resulting XMI.
  • Access: public

Parameters:

mixed   $path   —  Path(s) of the directories. Can be a single path, or an array of pathes.
string   $model   —  Name of the model placed at root (enclosing pkg)

[ Top ]

parseFile   [line 204]

void parseFile( mixed $filename, [string $model = 'default'])

Parse a PHP file, and builds the resulting XMI.
  • Access: public

Parameters:

mixed   $filename   —  File(s) to parse. Can be a single file, or an array of files.
string   $model   —  Name of the model placed at root (enclosing pkg). It is the "PHP global" namespace

[ Top ]

saveXMI   [line 316]

void saveXMI( string $output_file)

Save the previously generated XMI to a file.
  • Access: public

Parameters:

string   $output_file   —  Filename

[ Top ]

__get   [line 357]

string __get( string $name)

Accessor to the XMI.
  • Return: The XMI code, or a PHP_UML_Parser_Result object
  • Access: public

Parameters:

string   $name   —  Possible value(s) : "XMI"

[ Top ]


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