* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * GraphvizCommand. * * @author William DURAND */ class GraphvizCommand extends PhingCommand { /** * @see Command */ protected function configure() { $this ->setDescription('Generates Graphviz file for your project') ->setHelp(<<propel:graphviz generates Graphviz file for your project. php app/console propel:graphviz EOT ) ->setName('propel:graphviz') ; } /** * @see Command * * @throws \InvalidArgumentException When the target directory does not exist */ protected function execute(InputInterface $input, OutputInterface $output) { $dest = $this->getApplication()->getKernel()->getRootDir() . '/propel/graph/'; $this->callPhing('graphviz', array( 'propel.graph.dir' => $dest, )); $output->writeln(sprintf('Graphviz file is in "%s".', $dest)); } }