/
GraphvizGenerateCommand.php
55 lines (46 loc) · 1.31 KB
/
GraphvizGenerateCommand.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* This file is part of the PropelBundle package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/
namespace Propel\Bundle\PropelBundle\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Propel\Generator\Command\GraphvizGenerateCommand as BaseGraphvizGenerateCommand;
/**
* @author Kévin Gomez <contact@kevingomez.fr>
*/
class GraphvizGenerateCommand extends WrappedCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
{
parent::configure();
$this
->setName('propel:graphviz:generate')
->setDescription('Generate Graphviz files (.dot)')
->addOption('output-dir', null, InputOption::VALUE_REQUIRED, 'The output directory', BaseGraphvizGenerateCommand::DEFAULT_OUTPUT_DIRECTORY)
;
}
/**
* {@inheritdoc}
*/
protected function createSubCommandInstance()
{
return new BaseGraphvizGenerateCommand();
}
/**
* {@inheritdoc}
*/
protected function getSubCommandArguments(InputInterface $input)
{
return array(
'--output-dir' => $input->getOption('output-dir'),
);
}
}