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

Class: PHP_UML

Source Location: /PHP_UML-1.6.2/UML.php

Class Overview


Facade to use, through its methods:


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 53]
Facade to use, through its methods:

  • the setInput() method to set the files and/or directories to parse
  • the parse('name') method to start parsing, and building the model
  • the helper method export('format', 'location') to export the model
For example:
  1.  $t = new PHP_UML();
  2.  $t->setInput('PHP_UML/');
  3.  $t->export('xmi''/home/wwww/');

If you want to produce XMI without using the PHP parser, please refer to the file /examples/test_with_api.php; it will show how you can build a model by yourself, with the PHP_UML_Metamodel package.



[ Top ]


Class Variables

$componentView =  false

[line 80]

If true, a component view is created.

file system. Each file produces an component

  • Access: public

Type:   boolean


[ Top ]

$deploymentView =  true

[line 73]

If true, a UML deployment view is created.

Each file produces an artifact.

  • Access: public

Type:   boolean


[ Top ]

$docblocks =  true

[line 87]

If true, the docblocks content is parsed.

All possible information is retrieved : general comments, @package, @param...

  • Access: public

Type:   boolean


[ Top ]

$dollar =  true

[line 118]

If true, the PHP variable prefix $ is kept
  • Access: public

Type:   boolean


[ Top ]

$logicalView =  true

[line 66]

If true, a UML logical view is created.
  • Access: public

Type:   boolean


[ Top ]

$onlyApi =  false

[line 94]

If true, the elements (class, function) are included in the API only if their

comments contain explicitly a docblock "@api"

  • Access: public

Type:   boolean


[ Top ]

$pureObject =  false

[line 100]

If true, only classes and namespaces are retrieved. If false, procedural

functions and constants are also included

  • Access: public

Type:   mixed


[ Top ]

$removeEmptyNamespaces =  true

[line 106]

If true, the empty namespaces (inc. no classes nor interfaces) are ignored
  • Access: public

Type:   boolean


[ Top ]

$showInternal =  false

[line 112]

If true, the elements marked with @internal are included in the API.
  • Access: public

Type:   boolean


[ Top ]



Method Detail

__construct (Constructor)   [line 172]

PHP_UML __construct( )

Constructor.

Creates an empty model and holds a reference to it.

  • Access: public

[ Top ]

autoload   [line 428]

void autoload( string $class)

Autoloader

Parameters:

string   $class   —  Class name

[ Top ]

export   [line 386]

void export( [string $format = 'xmi'], [string $outputDir = '.'])

Convert the UML model (stored in the object) into some output data.
  • Access: public

Parameters:

string   $format   —  Desired format ("xmi", "html", "php"...)
string   $outputDir   —  Output directory

[ Top ]

getModel   [line 407]

PHP_UML_Metamodel_Superstructure getModel( )

Public accessor to the metamodel.
  • Return: Model generated during PHP parsing
  • Access: public

[ Top ]

parse   [line 333]

PHP_UML_Metamodel_Superstructure parse( [string $modelName = 'default'])

Parse the directories and the files (depending on what the $directories and $files properties have been set to with setInput()) and return a UML model.
  • Return: The resulting UML model
  • Access: public

Parameters:

string   $modelName   —  A model name (e.g., the name of your application)

[ Top ]

parseDirectory   [line 318]

PHP_UML_Metamodel_Superstructure parseDirectory( mixed $directories, [string $modelName = 'default'])

Parse a PHP folder, and return a PHP_UML_Metamodel_Superstructure object (= a UML model) corresponding to what has been parsed.
  • Return: The resulting UML model
  • Deprecated: Use setInput() instead
  • Access: public

Parameters:

mixed   $directories   —  Directory path(es). Can be a single path, or an array of pathes.
string   $modelName   —  A name for the model to generate

[ Top ]

parseFile   [line 191]

PHP_UML_Metamodel_Superstructure parseFile( mixed $files, [string $name = 'default'])

Parse a PHP file, and return a PHP_UML_Metamodel_Superstructure object (= a UML model) corresponding to what has been found in the file.
  • Return: The resulting UML model
  • Deprecated: Use setInput() instead
  • Access: public

Parameters:

mixed   $files   —  File(s) to parse. Can be a single file, or an array of files.
string   $name   —  A name for the model to generate

[ Top ]

setExporter   [line 417]

void setExporter( PHP_UML_Output_Exporter $exporter)

Set the exporter to use (an Output_Xmi_Exporter is already set by default)
  • Access: public

Parameters:

PHP_UML_Output_Exporter   $exporter   —  The exporter object to use

[ Top ]

setIgnorePatterns   [line 258]

void setIgnorePatterns( mixed $patterns)

Set a list of files / directories to ignore during parsing Usage: $phpuml->setIgnorePatterns(array('examples', '.svn')); Or: $phpuml->setIgnorePatterns('examples .svn');
  • Access: public

Parameters:

mixed   $patterns   —  List of patterns (string or array)

[ Top ]

setImporter   [line 227]

void setImporter( PHP_UML_Input_ImporterFileScanner $importer)

Setter for the FileScanner used for the parsing. Automatically sets the importer's model with the model owned by PHP_UML
  • Access: public

Parameters:

PHP_UML_Input_ImporterFileScanner   $importer   —  FileScanner to be used

[ Top ]

setInput   [line 203]

void setInput( mixed $pathes)

Set the input elements (files and/or directories) to parse
  • Access: public

Parameters:

mixed   $pathes   —  Array, or string of comma-separated-values

[ Top ]

setMatchPatterns   [line 241]

void setMatchPatterns( mixed $patterns)

Setter for the filename patterns.

Usage: $phpuml->setFilePatterns(array('*.php', '*.php5')); Or: $phpuml->setFilePatterns('*.php, *.php5');

  • Access: public

Parameters:

mixed   $patterns   —  List of patterns (string or array)

[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:01:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.