Skip to content
This repository
Newer
Older
100644 56 lines (48 sloc) 1.426 kb
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
1 <?php
2
87ad04f2 » willdurand
2011-08-30 Fixed LICENSE
3 /**
4 * This file is part of the PropelBundle package.
5 * For the full copyright and license information, please view the LICENSE
6 * file that was distributed with this source code.
7 *
8 * @license MIT License
9 */
10
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
11 namespace Propel\PropelBundle\Command;
12
29ca5953 » willdurand
2012-04-20 Removed 'Propel' class prefixes
13 use Propel\PropelBundle\Command\AbstractCommand;
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
14 use Symfony\Component\Console\Input\InputInterface;
15 use Symfony\Component\Console\Output\OutputInterface;
16
17 /**
590787d2 » willdurand
2012-05-09 Removed command headers, fixed naming
18 * GraphvizGenerateCommand.
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
19 *
e181e2d9 » willdurand
2011-04-19 Minor changes on graphviz command
20 * @author William DURAND <william.durand1@gmail.com>
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
21 */
590787d2 » willdurand
2012-05-09 Removed command headers, fixed naming
22 class GraphvizGenerateCommand extends AbstractCommand
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
23 {
24 /**
25 * @see Command
26 */
27 protected function configure()
28 {
29 $this
30 ->setDescription('Generates Graphviz file for your project')
31 ->setHelp(<<<EOT
32 The <info>propel:graphviz</info> generates Graphviz file for your project.
e181e2d9 » willdurand
2011-04-19 Minor changes on graphviz command
33
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
34 <info>php app/console propel:graphviz</info>
35 EOT
36 )
590787d2 » willdurand
2012-05-09 Removed command headers, fixed naming
37 ->setName('propel:graphviz:generate')
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
38 ;
39 }
40
41 /**
42 * @see Command
43 *
44 * @throws \InvalidArgumentException When the target directory does not exist
45 */
46 protected function execute(InputInterface $input, OutputInterface $output)
e181e2d9 » willdurand
2011-04-19 Minor changes on graphviz command
47 {
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
48 $dest = $this->getApplication()->getKernel()->getRootDir() . '/propel/graph/';
49
50 $this->callPhing('graphviz', array(
51 'propel.graph.dir' => $dest,
52 ));
53
590787d2 » willdurand
2012-05-09 Removed command headers, fixed naming
54 $this->writeNewDirectory($output, $dest);
37362321 » willdurand
2011-03-26 Added new command to generate a Graphviz file of your project
55 }
56 }
Something went wrong with that request. Please try again.