Development

/branches/1.4/lib/plugins/sfPropelPlugin/lib/task/sfPropelGraphvizTask.class.php

You must first sign up to be able to contribute.

root/branches/1.4/lib/plugins/sfPropelPlugin/lib/task/sfPropelGraphvizTask.class.php

Revision 23810, 1.5 kB (checked in by Kris.Wallsmith, 4 years ago)

[1.3] set svn:eol-style property to native and svn:keywords property to Id on all .php files

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 require_once(dirname(__FILE__).'/sfPropelBaseTask.class.php');
12
13 /**
14  * Generates a graphviz chart of current object model.
15  *
16  * @package    symfony
17  * @subpackage propel
18  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
19  * @version    SVN: $Id$
20  */
21 class sfPropelGraphvizTask extends sfPropelBaseTask
22 {
23   /**
24    * @see BaseTask::configure()
25    */
26   protected function configure()
27   {
28     $this->addOptions(array(
29       new sfCommandOption('phing-arg', null, sfCommandOption::PARAMETER_REQUIRED | sfCommandOption::IS_ARRAY, 'Arbitrary phing argument'),
30     ));
31
32     $this->namespace = 'propel';
33     $this->name = 'graphviz';
34     $this->briefDescription = 'Generates a graphviz chart of current object model';
35     $this->detailedDescription = <<<EOF
36 The [propel:graphviz|INFO] task creates a graphviz DOT
37 visualization for automatic graph drawing of object model:
38
39   [./symfony propel:graphviz|INFO]
40 EOF;
41   }
42
43   /**
44    * @see BaseTask::execute()
45    */
46   protected function execute($arguments = array(), $options = array())
47   {
48     $this->schemaToXML(self::DO_NOT_CHECK_SCHEMA, 'generated-');
49     $this->copyXmlSchemaFromPlugins('generated-');
50     $ret = $this->callPhing('graphviz', self::CHECK_SCHEMA);
51     $this->cleanup();
52
53     return !$ret;
54   }
55 }
56
Note: See TracBrowser for help on using the browser.