1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 |
<?php
/**
* @package examples
* @subpackage ThreeLittlePigs
*/
/**
* @author Thiago Henrique Ramos da Mata <thiago.henrique.mata@gmail.com>
* Three Little Pigs as simple example of the code to diagram
*
* 1. require once the code to diagram started
* 2. start the code to diagram
* 3. load the necessary classes
* 4. start the history
*/
// 1. require once the code to diagram started
require_once( '../../public/codetodiagram.php' );
CodeToDiagram::getInstance()->start();
// 2. start the code to diagram
CodeToDiagram::getInstance()->getConfiguration()->getMatchGroupStereotypes()
->addItemName( "History" , UmlSequenceDiagramStereotype::getStereotypeByName( "boundary" ) )
->addItemName( "Wolf" , UmlSequenceDiagramStereotype::getStereotypeByName( "user" ) )
->addItemName( "LittlePig" , UmlSequenceDiagramStereotype::getStereotypeByName( "controller" ) )
->addItemName( "House" , UmlSequenceDiagramStereotype::getStereotypeByName( "entity" ) )
;
// 3. load the necessary classes
require_once( 'Wolf.class.php' );
require_once( 'Pig.class.php' );
require_once( 'House.class.php' );
require_once( 'History.class.php' );
// 4. start the history
new History();
?> |