UML diagram
Support by UML2PHP5
| Constraint |
Supported |
| Generate all necessaries requires inside MyClassA.class.php |
YES |
| Generate an attribute which name is the declared associating role name
(here is myB) |
YES |
| Generate an attribute which name is derivated from the part class with
$O_ prefix (here $O_MyClassC) if no associating role name was defined and
AGGREGATION_IMPLICIT_NAMING parameter from config file is ON (default) |
YES |
| If the cardinality (multiplicity) was set to 1 or was not defined, the attribute
will be set to NULL (here is the case of $myB). |
YES |
| If the cardinality is different from 1, the attribute will be set to array()
(here is the case of $O_myClassC). |
YES |
| Generate accept_rolename method if an associating role name
was defined (here is the case of myB). |
YES |
| Generate accept_classnameElement (here accept_MyClassCElement)
if no associating role name
was defined and AGGREGATION_IMPLICIT_NAMING
parameter from config file is set to ON (default). |
YES |
File: MyClassA.class.php
<?php
require_once('MyClassB.class.php');
require_once('MyClassC.class.php');
class MyClassA {
private $myB = NULL ;
private $O_MyClassC = array() ;
public $MyAttribute;
public function accept_MyB(MyClassB $element) {
$this->MyB = $element;
}
public function accept_MyClassCElement(MyClassC $element) {
$this->O_MyClassC[] = $element;
}
}
?>