Warning: You're looking at a styleless page because your browser is ignoring CSS styles. You're probably using a very old browser, or you disabled CSS support by purpose. We suggest you to download a modern browser such as Firefox or Internet Explorer.
Here you can see how XMI2PHP work. Left is presented the UML diagram drawned and right is displayed the generated PHP code.
![]() |
SampleClass.php:
<?php
/**
*
*
*/
class SampleClass{
}
?>
Each defined class is generated in a single file named with the class name. For example in the above example, the generated file is SampleClass.php. |
![]() |
SampleClass.php:
<?php
/**
*
*
* @see SampleClassChild
*/
class SampleClass{
}
?>
SampleClassChild.php: <?php
require_once("SampleClass.php");
/**
*
*
*/
class SampleClassChild extends SampleClass{
}
?>
As you can see inheritance is supported. a require_once call is done over the parent class filename, and an "extends" keyword is added to the class definition. You can also see that all direct sub-classes are mentionned in the parent code. |
![]() |
SampleClass.php:
<?php
/**
* This is the documentation of SampleClass
* You can write multiline, they will be written
* in the generated document
*
*/
class SampleClass{
}
?>
In the generated code, each line is prefixed with a star to have a pretty formating. |
![]() |
SampleClass.php:
<?php
/**
* This is the documentation of SampleClass
* You can write multiline, they will be written
* in the generated document
*
*/
class SampleClass{
/**
* Documentation of privateProperty
* with more than one line
*
* @access private
* @var string
*/
var $_privateProperty = \'\';
}
?>
XMI2PHP generate code with embedding PHPEdit/PHPDoc documentation tags. |