UML2PHP5 -> Support::'final' classes and methods
UML diagrams
Diagramme UML: visibilité des méthodes
Diagramme UML: visibilité des méthodes
Support by UML2PHP5
Constraint Supported
Generate one file per class YES
Generate final class MyclassA YES
Generate error message if a subclass is a child of MyClassA YES
Generate public final function myOperation_1() YES
Generate error message if a method of MyClassD overload myOperation_1() YES
File: MyClassA.class.php
<?php
/**
 * 
 * Code skeleton generated by dia-uml2php5 plugin
 * written by KDO kdo@zpmag.com 
 */

final class MyClassA  {


    private  $attr_1;

    public function myOperation_1() {
    
    }


}
?>
File: MyClassB.class.php
<?php
/**
 * 
 * Code skeleton generated by dia-uml2php5 plugin
 * written by KDO kdo@zpmag.com 
 */
require_once('MyClassA.class.php');

class MyClassB extends MyClassA  {
// ERROR:PARENT IS DECLARED AS 'final' !

    public function myOperation_1() {
    
    }

    public function myOperation_2() {
    
    }

}
?>
File: MyClassC.class.php
<?php
/**
 * 
 * Code skeleton generated by dia-uml2php5 plugin
 * written by KDO kdo@zpmag.com 
 */

class MyClassC {

    private  $attr_1;
	 
    public final function myOperation_1() {
    
    }


}
?>
File: MyClassD.class.php
<?php
/**
 * 
 * Code skeleton generated by dia-uml2php5 plugin
 * written by KDO kdo@zpmag.com 
 */
require_once('MyClassC.class.php');

class MyClassB extends MyClassA  {

    public function myOperation_1() {
    //ERROR: METHOD CAN'T BE OVERLOADED, PARENT HAS DECLARED IT 'final'!
    }

    public function myOperation_2() {
    
    }

}
?>

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