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

Class: PHP_UML_Metamodel_Superstructure

Source Location: /PHP_UML-1.0.1/UML/Metamodel/Superstructure.php

Class Overview


A superstructure to gather program elements A PHP_UML_Metamodel_Superstructure object reflects the structure of some existing PHP code (like the one parsed by the parser), in termes of packages, classes, functions, etc.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 36]
A superstructure to gather program elements A PHP_UML_Metamodel_Superstructure object reflects the structure of some existing PHP code (like the one parsed by the parser), in termes of packages, classes, functions, etc.

Once such an object is built, we just need to "serialize" it to get the XMI code. This is the job of PHP_UML->generateXMI()

Normally, such a PHP_UML_Metamodel_Superstructure object is built and passed to the PHP_UML_PHP_Parser by an instance of PHP_UML.



[ Top ]


Class Variables

$deploymentPackages =

[line 50]

The root package (= the physical folder)
  • Access: public



[ Top ]

$packages =

[line 43]

The root package (a UML Model)
  • Access: public



[ Top ]

$stereotypes = array()

[line 59]

Stack of all stereotypes TODO: when real stereotypes will be implemented, deleting that array, and reading the stereotypes from the $packages instead
  • Access: public

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 65]

PHP_UML_Metamodel_Superstructure __construct( )

Constructor
  • Access: public

[ Top ]

addInternalPhpTypes   [line 75]

void addInternalPhpTypes( PHP_UML_Metamodel_Package &$package)

Adds the internal PHP datatypes, classes, interfaces...

To be completed...

  • Access: public

Parameters:

PHP_UML_Metamodel_Package   &$package     Base package

[ Top ]

createStereotype   [line 196]

PHP_UML_Metamodel_Stereotype createStereotype( PHP_UML_Metamodel_NamedElement &$element, string $profileName, string $stereotypeName)

Creates a stereotype in a given profile, and binds it to a given element Returns the stereotype that was created
  • Access: public

Parameters:

PHP_UML_Metamodel_NamedElement   &$element     The element
string   $profileName     The profile name
string   $stereotypeName     The stereotype name

[ Top ]

getPackagePathParts   [line 321]

array getPackagePathParts( string $path, [bool $modeFirst = true], [string $alt = PHP_UML_PHP_Parser::T_NS_SEPARATOR2])

Splits a package path into its first/last element, and the rest Allows for the two different versions of package delimiter
  • Return: Results array
  • Access: public

Parameters:

string   $path     A path to split
bool   $modeFirst     If true, splits into 1st and the rest If false, splits into last and the rest
string   $alt     Alternate separator (eg, the directory separator)

[ Top ]

getStereotype   [line 176]

PHP_UML_Metamodel_Stereotype getStereotype( PHP_UML_Metamodel_NamedElement &$element, string $profileName, string $stereotypeName)

Retrieves the stereotype (named $name) associated to the element $element If not found, returns null.
  • Access: public

Parameters:

PHP_UML_Metamodel_NamedElement   &$element     Related object
string   $profileName     Profile name
string   $stereotypeName     Stereotype name

[ Top ]

getStereotypeTag   [line 215]

PHP_UML_Metamodel_Tag getStereotypeTag( PHP_UML_Metamodel_Stereotype $s, string $tagName)

Retrieves a particular tag in a given stereotype
  • Access: public

Parameters:

PHP_UML_Metamodel_Stereotype   $s     The stereotype
string   $tagName     The tag name ("description", e.g)

[ Top ]

resolveAll   [line 390]

void resolveAll( [array $defPkg = array()])

Launch the resolution of the references for all stacks from the root pkg

Every reference (a temporary string) is replaced by a PHP reference to the corresponding type (that is, a class or a datatype) Must be run once the model is complete (= once PHP parsing is done)

  • Access: public

Parameters:

array   $defPkg     Array of PHP_UML_Metamodel_Package where to look into, in order to resolve the orphaned elements. By default, it will look in the root package. This is, by the way, where the PHP datatypes are.

[ Top ]

searchIntoSubpackage   [line 235]

mixed searchIntoSubpackage( PHP_UML_Metamodel_Package &$np, string $value)

Searches recursively in a given package for a package, knowing its name Works with position numbers, not variable references.
  • Return: Either FALSE if not found, or the position in the stack
  • Access: public

Parameters:

PHP_UML_Metamodel_Package   &$np     A package element (context)
string   $value     A package name (to find)

[ Top ]

searchTypeIntoPackage   [line 156]

mixed searchTypeIntoPackage( PHP_UML_Metamodel_Package &$ns, string $value)

Searches in a given package for a typed element (likely, a class)
  • Return: Either FALSE if not found, or the element
  • Access: public

Parameters:

PHP_UML_Metamodel_Package   &$ns     A package element
string   $value     A name

[ Top ]


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