Development

#2610: GraphvizTask.class.php

You must first sign up to be able to contribute.

Ticket #2610: GraphvizTask.class.php

File GraphvizTask.class.php, 1.6 kB (added by jablko, 1 year ago)
Line 
1 <?php
2
3 /*
4  * This file is part of the Qubit Toolkit.
5  * Copyright (C) 2006-2007 Peter Van Garderen <peter@artefactual.com>
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the Free
9  * Software Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc., 51
19  * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20  */
21
22 class GraphvizTask extends sfPropelBaseTask
23 {
24   /**
25    * @see BaseTask::configure()
26    */
27   protected function configure()
28   {
29     $this->namespace = 'propel';
30     $this->name = 'graphviz';
31     $this->briefDescription = 'Creates Graphviz for current model';
32     $this->detailedDescription = <<<EOF
33 The [propel:graphviz|INFO] task creates DOT visualization for automatic graph drawing:
34
35   [./symfony propel:graphviz|INFO]
36 EOF;
37   }
38
39   /**
40    * @see BaseTask::execute()
41    */
42   protected function execute($arguments = array(), $options = array())
43   {
44     $this->schemaToXML(self::DO_NOT_CHECK_SCHEMA, 'generated-');
45     $this->copyXmlSchemaFromPlugins('generated-');
46     $this->callPhing('graphviz', self::CHECK_SCHEMA);
47     $this->cleanup();
48   }
49 }
50