Пример #1
0
 public function testAllFormatsCall()
 {
     $output = self::TEMP_DIR . 'new_variousapi.xmi';
     $version = 2.1;
     $modelName = 'Foo';
     $encoding = 'iso-8859-1';
     $errorLevel = 1;
     $uml = new PHP_UML();
     $uml->parseFile(self::SUITE_DIR . 'test1.php', $modelName);
     chdir(dirname(__FILE__));
     echo $uml->export('xmi', $output);
     $this->assertTrue(file_exists($output));
     // now, we test the other output formats:
     $uml->export('html', self::TEMP_DIR);
     $uml->export('php', self::TEMP_DIR);
     $uml->export('HtmlNew', self::TEMP_DIR);
     $uml->export('Eclipse', self::TEMP_DIR);
 }
Пример #2
0
 *
 * PHP version 5
 *
 * @category PHP
 * @package  PHP_UML
 * @author   Baptiste Autin <*****@*****.**>
 *
 */
error_reporting(E_ALL);
require_once 'PHP/UML.php';
/**
 * Example 1: Basic example with file "test.php", in UML/XMI version 2
 */
$t = new PHP_UML();
$t->setMatchPatterns('*');
$t->parseFile('test1.php.txt', 'global');
// We parse the file "test.php" ; the default namespace is 'global'
$t->export('xmi', 'test_example1.xmi');
// We export the model as XMI/UML code
/**
 * Example 2: Advanced example in UML/XMI version 1. It shows how to explicitely
 * use an Exporter object, in order to get access to more configuration options.
 */
$t = new PHP_UML();
$t->dollar = false;
// We don't keep the $ before the variable names
$t->componentView = false;
// We don't want a component view to be included
$t->deploymentView = false;
// We don't want a deployment view (artifacts+folders)
$t->docblocks = true;