UML2PHP5 - Support::object as method's parameter
UML diagram
Diagramme UML: visibilité des méthodes
With PHP5 you can declare the type of a variable, but only in one case : if a method's parameter is an object, its name can be preceded by the name of the class which this object is an instance of.
UML2PHP5 generates the type of a parameter in two ways :
  • When the type is preceded explicitly by object as same as the CB parameter of the method setCalendarBuilder from the upside UML diagram.
  • When the type is not a basic type of PHP, as same as the DC parameter of the methode setDataControler from the upside UML diagram.
UML2PHP5 knows these basic types of PHP (except 'object') :
  • boolean, integer, float, double, string
  • array
  • resource
  • mixed, number, callback
in lowercase, uppercase or mixed cases.
Support by UML2PHP5
Constraint Supported
Don't generate type of the parameters when and link YES
Generate type of parameter DC YES
Generate type of parameter CB YES
File: Calendar.class.php
<?php
/**
 * 
 * Code skeleton generated by dia-uml2php5 plugin
 * written by KDO kdo@zpmag.com 
 */

class Calendar  {


   public final  function __construct($when, $link) {

   }
    
   public final  function setDataControler(CalendarDataControler $DC) {

   }
	
   public final  function setCalendarBuilder(CalendarBuilder $CB) {

   }

}
?>

Valid XHTML 1.1! Valid CSS! Mozilla Homepage Apache Web Server! PHP: Hypertext Processor MySQL: Open Source Database
Get Firefox!