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

Class: PHP_UML_Metamodel_TypeResolver

Source Location: /PHP_UML-1.6.2/UML/Metamodel/TypeResolver.php

Class Overview


A TypeResolver is a class designed to correct a Metamodel_Package whose


Author(s):

Variables

Methods


Child classes:

PHP_UML_Metamodel_TypeResolverByName
An implementation of TypeResolver that completes the relationships between the elements of a superstructure by using the elements name.
PHP_UML_Metamodel_TypeResolverById
An implementation of TypeResolver that complete the relationships between the elements of a superstructure on the base of the elements ID.

Inherited Variables

Inherited Methods


Class Details

[line 32]
A TypeResolver is a class designed to correct a Metamodel_Package whose

relationships between elements are not realized by direct references (nut by means of a qualified name, or an ID...) Such a tool is particularly needed when building a UML model, as during the iteration process, some of the referenced elements may have not yet been met.



[ Top ]


Class Variables

$defaultRepo = array()

[line 46]

List of default packages where to look for orphaned elements
  • Access: protected

Type:   array


[ Top ]

$topPackage =

[line 39]

A reference of the top package of the model to resolve
  • Access: protected



[ Top ]



Method Detail

getPackageByPath   [line 86]

PHP_UML_Metamodel_Package getPackageByPath( string $path)

Retrieve the PHP_UML_Metamodel_Package object related to a package path (ie, to a qualified name, like A\B\C).

Relies on the model->$packages, when references are still named (= before their resolution)

  • Return: The package to find. Null if not found.
  • Access: protected

Parameters:

string   $path   —  The path to find

[ Top ]

resolutionWarning   [line 69]

void resolutionWarning( string $element, PHP_UML_Metamodel_NamedElement $na)

Resolution error. Might later be isolated in a specific class.
  • Access: protected

Parameters:

string   $element   —  Element
PHP_UML_Metamodel_NamedElement   $na   —  NamedElement

[ Top ]

resolve   [line 60]

void resolve( PHP_UML_Metamodel_Package &$ns, array $default)

Recursively replaces all the "named types" by a proper "reference" to a

typed element. This impacts:

  • the extended classes and implemented classes (through their
EMOF-"superClass" and "implements" relations)
  • the function parameters (through their EMOF-"type" attribute)
  • the properties in classes (through their EMOF-"type" attribute)

  • Abstract:
  • Access: public

Overridden in child classes as:

PHP_UML_Metamodel_TypeResolverByName::resolve()
PHP_UML_Metamodel_TypeResolverById::resolve()

Parameters:

PHP_UML_Metamodel_Package   &$ns   —  Package to resolve the elements of
array   $default   —  Default packages where to look for orphaned elements

[ Top ]


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