Conversion rules

Conversion rules – How do PHP elements map to UML concepts?

Logical view

  • A PHP class (or interface) maps to an UML Class (or Interface).

  • A PHP function maps to an UML Operation.

  • A PHP property, or class constant, maps to an UML Attribute.

Packages do not exist in PHP, like they do in Java. There are two possible ways to mimic them:

  • by using the PHP namespace instruction

  • by using the docblock @package in the comment of a class (or of a file)

Note that the namespace and use instructions will be parsed only if you run PHP_UML with PHP from version 5.3.

Deployment view

  • A PHP file maps to an UML Artifact.

  • A physical folder maps to an UML Package.

Component view

In UML 1.4:

  • A class (or an interface) maps to an UML Component.

  • A logical package maps to an UML Subpackage.

In UML 2.1:

  • A class (or an interface) maps to an UML Component.

  • A logical package maps to a nesting UML Component.

API (Previous) PHPUnit (Next)
Last updated: Tue, 02 Jun 2009 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.