Esempio n. 1
0
 /**
  *
  * {@inheritDoc}
  *
  * @see \SK\ITCBundle\Command\AbstractCommand::configure()
  */
 protected function configure()
 {
     parent::configure();
     $outputDirectory = getcwd() . DIRECTORY_SEPARATOR . 'src';
     $this->addOption("namespace", "ns", InputOption::VALUE_OPTIONAL, "REST API Target namespace.", "\\");
     $this->addOption("outputDirectory", "o", InputOption::VALUE_OPTIONAL, "REST API Target namespace.", $outputDirectory);
     $this->addArgument('raml', InputArgument::REQUIRED, 'RAML Source file');
 }
Esempio n. 2
0
 /**
  * (non-PHPdoc)
  *
  * @see \Symfony\Component\Console\Command\Command::configure()
  */
 protected function configure()
 {
     parent::configure();
 }
Esempio n. 3
0
 /**
  * (non-PHPdoc)
  *
  * @see \SK\ITCBundle\Code\Generator\PHPUnit\AbstractGenerator::execute($input, $output)
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     $this->writeTable(120);
 }
 /**
  * (non-PHPdoc)
  *
  * @see \SK\ITCBundle\Code\Generator\PHPUnit\AbstractGenerator::execute($input, $output)
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     $src = $this->getInput()->getArgument("src");
     $this->writeInfo(sprintf("Searching files in '%s' sources.", implode("', '", $src)));
     $canContinue = false;
     foreach ($src as $source) {
         if (file_exists($source) || is_dir($source)) {
             $canContinue = true;
         }
     }
     if (!$canContinue) {
         $this->writeInfo(sprintf("Sources '%s' doesn't exists.", implode("', '", $src)));
         return;
     }
     if ($this->getInput()->hasOption("bootstrap")) {
         $bootstrap = $this->getInput()->getOption("bootstrap");
         try {
             if (file_exists($bootstrap)) {
                 @(require_once $bootstrap);
                 $this->writeInfo(sprintf("Finder Adding Boostrap'%s'", $bootstrap), OutputInterface::VERBOSITY_VERY_VERBOSE);
             }
         } catch (\Exception $e) {
             $this->writeException($e);
         }
     }
     $this->writeTable(120);
 }