phuml
phuml copied to clipboard
How phUML handles arrays - UML syntax
phUML tries to use the more specific type of the classes stored in an array, as explained here. The notation ClassDefinition[]
is however not valid UML and ClassDefinition[*]
should be preferred according to UML syntax for multiplicity (see UML 2.5.1 specifications on the OMG website, chapter 7.5.4.1).
Likewise, if no such specific class is found, phUML seems to use array
which hides somewhat the multiplicity in the UML diagram. Using mixed[*]
, in view of PHP type documentation, would allow to remain compliant with PHP semantics (freedom to put anything in an array) and UML.