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

Class: PHP_UML_Metamodel_Superstructure

Source Location: /PHP_UML-0.4.4/UML/Metamodel/PHP.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.


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 229]
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, a PHP_UML_Metamodel_Superstructure object is built by PHP_UML_PHP_Parser, so you should not bother about it, but you may want to generate such an object "by yourself", and pass it to the XMI builder for "manual" XMI generation. See the file /examples/test_with_api.php for a complete example.



[ Top ]


Class Variables

$classes =

[line 233]

  • Access: public

Type:   mixed


[ Top ]

$datatypes =

[line 236]

  • Access: public

Type:   mixed


[ Top ]

$files =

[line 237]

  • Access: public

Type:   mixed


[ Top ]

$interfaces =

[line 232]

  • Access: public

Type:   mixed


[ Top ]

$operations =

[line 234]

  • Access: public

Type:   mixed


[ Top ]

$packages =

[line 231]

  • Access: public

Type:   mixed


[ Top ]

$parameters =

[line 235]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 244]

PHP_UML_Metamodel_Superstructure __construct( )

Constructor
  • Access: public

[ Top ]

getPackagePathParts   [line 446]

array getPackagePathParts( string $path, [bool $modeFirst = true])

Splits a package path into its first/last element, and the rest
  • Return: Results array
  • Access: public

Parameters:

string   $path   —  The path to check
bool   $modeFirst   —  If true, splits into 1st and the rest If false, splits into last and the rest

[ Top ]

resolveAll   [line 498]

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

Launches 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   —  List of packages where to look for the orphaned elements By default, looks in the root package

[ Top ]

searchIntoSubpackage   [line 332]

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 313]

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 Mon, 11 Mar 2019 15:22:53 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.