
Public Member Functions | |
| getHeader () | |
| perform (UmlSequenceDiagram $objUmlSequenceDiagram) | |
| createXml () | |
| createXmlHeader () | |
| createXmlFooter () | |
| createXmlActors () | |
| createXmlMessages () | |
| setConfiguration (UmlSequenceDiagramPrinterConfigurationInterface $objConfiguration) | |
| getConfiguration () | |
Static Public Member Functions | |
| static | getInstance () |
Protected Attributes | |
| $objUmlSequenceDiagram | |
| $objConfiguration | |
Static Protected Attributes | |
| static | $objInstance |
Definition at line 12 of file UmlSequenceDiagramPrinterToXml.class.php.
| createXml | ( | ) |
Create and return the xml of the sequence diagram object
Definition at line 82 of file UmlSequenceDiagramPrinterToXml.class.php.
References $strXml, createXmlActors(), createXmlFooter(), createXmlHeader(), and createXmlMessages().
Referenced by perform().
00083 { 00084 $strXml = ''; 00085 $strXml .= $this->createXmlHeader(); 00086 $strXml .= $this->createXmlActors(); 00087 $strXml .= $this->createXmlMessages(); 00088 $strXml .= $this->createXmlFooter(); 00089 return $strXml; 00090 }
| createXmlActors | ( | ) |
Create and return the actors slice of the xml
$objActor UmlSequenceDiagramActor
Definition at line 117 of file UmlSequenceDiagramPrinterToXml.class.php.
Referenced by createXml().
00118 { 00119 $arrActors = $this->objUmlSequenceDiagram->getActors(); 00120 00121 $strXmlActors = "\t<actors>\n"; 00122 foreach( $arrActors as $objActor ) 00123 { 00125 $strXmlActors .= "\t\t"; 00126 $strXmlActors .= "<actor "; 00127 $strXmlActors .= 'id="' . $objActor->getId() . '" '; 00128 $strXmlActors .= 'type="' . $objActor->getType() . '" '; 00129 $strXmlActors .= '>'; 00130 $strXmlActors .= $objActor->getName() . ':' . $objActor->getClassName(); 00131 $strXmlActors .= "</actor>\n"; 00132 } 00133 $strXmlActors .= "\t</actors>\n"; 00134 return $strXmlActors; 00135 }
| createXmlFooter | ( | ) |
Create and return the footer slice of the xml
Definition at line 107 of file UmlSequenceDiagramPrinterToXml.class.php.
Referenced by createXml().
| createXmlHeader | ( | ) |
Create and return the header slice of the xml
Definition at line 97 of file UmlSequenceDiagramPrinterToXml.class.php.
Referenced by createXml().
| createXmlMessages | ( | ) |
Create and return the messages slice of the xml
$objMessage UmlSequenceDiagramMessage
$objValue UmlSequenceDiagramValue
Definition at line 142 of file UmlSequenceDiagramPrinterToXml.class.php.
Referenced by createXml().
00143 { 00144 $arrMessages = $this->objUmlSequenceDiagram->getMessages(); 00145 00146 $strXmlMessages = "\t<messages>\n"; 00147 foreach( $arrMessages as $objMessage ) 00148 { 00150 00151 $strXmlMessages .= "\t\t"; 00152 $strXmlMessages .= "<message "; 00153 $strXmlMessages .= 'type="' . $objMessage->getType() . '" '; 00154 $strXmlMessages .= 'from="' . $objMessage->getActorFrom()->getId() . '" '; 00155 $strXmlMessages .= 'to="' . $objMessage->getActorTo()->getId() . '" '; 00156 $strXmlMessages .= 'text="' . htmlentities( $objMessage->getText() ) . '" '; 00157 $strXmlMessages .= '>' . "\n"; 00158 00159 $strXmlMessages .= "\t\t\t"; 00160 $strXmlMessages .= "<values>\n"; 00161 00162 $arrValues = $objMessage->getValues(); 00163 foreach($arrValues as $objValue ) 00164 { 00166 $strXmlMessages .= "\t\t\t\t"; 00167 $strXmlMessages .= "<value "; 00168 $strXmlMessages .= 'name = "' . $objValue->getName() . '" '; 00169 $strXmlMessages .= 'value = "' . $objValue->getValue() . '" '; 00170 $strXmlMessages .= "/>\n"; 00171 } 00172 00173 $strXmlMessages .= "\t\t\t"; 00174 $strXmlMessages .= "</values>\n"; 00175 00176 $strXmlMessages .= "\t\t"; 00177 $strXmlMessages .= "</message>\n"; 00178 } 00179 $strXmlMessages .= "\t</messages>\n"; 00180 return $strXmlMessages; 00181 }
| getConfiguration | ( | ) |
use the configuration class of the xml printer
Implements UmlSequenceDiagramPrinterInterface.
Definition at line 196 of file UmlSequenceDiagramPrinterToXml.class.php.
| getHeader | ( | ) |
Get the header of the xml printer type
Implements UmlSequenceDiagramPrinterInterface.
Definition at line 56 of file UmlSequenceDiagramPrinterToXml.class.php.
| static getInstance | ( | ) | [static] |
Return the singleton of the UmlSequenceDiagramPrinterToXml
Implements UmlSequenceDiagramPrinterInterface.
Definition at line 44 of file UmlSequenceDiagramPrinterToXml.class.php.
Referenced by UmlSequenceDiagramPrinterConfigurationToXml::perform(), and CodeToDiagram::setPrinterType().
00045 { 00046 if( self::$objInstance == null ) 00047 { 00048 self::$objInstance = new UmlSequenceDiagramPrinterToXml(); 00049 } 00050 return self::$objInstance; 00051 }
| perform | ( | UmlSequenceDiagram $ | objUmlSequenceDiagram | ) |
Perfom the print process
| UmlSequenceDiagram | $objUmlSequenceDiagram |
Implements UmlSequenceDiagramPrinterInterface.
Definition at line 68 of file UmlSequenceDiagramPrinterToXml.class.php.
References createXml().
00069 { 00070 $this->objUmlSequenceDiagram = $objUmlSequenceDiagram; 00071 return $this->createXml(); 00072 }
| setConfiguration | ( | UmlSequenceDiagramPrinterConfigurationInterface $ | objConfiguration | ) |
use the configuration class of the xml printer
Implements UmlSequenceDiagramPrinterInterface.
Definition at line 187 of file UmlSequenceDiagramPrinterToXml.class.php.
00188 { 00189 $this->objConfiguration = $objConfiguration; 00190 }
$objConfiguration [protected] |
Uml Sequence Diagram Printer Configuration To Xml
Definition at line 28 of file UmlSequenceDiagramPrinterToXml.class.php.
$objInstance [static, protected] |
Singleton of the UmlSequenceDiagramPrinterToXml
Definition at line 36 of file UmlSequenceDiagramPrinterToXml.class.php.
$objUmlSequenceDiagram [protected] |
Uml Sequence Diagram object what will be print
Definition at line 20 of file UmlSequenceDiagramPrinterToXml.class.php.
1.5.9