protected function configure()
 {
     parent::configure();
     $this->setName('exception');
     $this->setDescription('Generate exceptions (RuntimeException, NotFoundException and other)');
     $this->addArgument('module', InputArgument::REQUIRED, 'Module name');
 }
示例#2
0
 protected function configure()
 {
     parent::configure();
     $this->setName('module');
     $this->setDescription('Generate module skeleton');
     $this->addArgument('module', InputArgument::REQUIRED, 'Module name');
 }
示例#3
0
 protected function write(State $state, InputInterface $input, OutputInterface $output)
 {
     $writeState = new State($this->configWriter);
     $writeState->addModel($state->getEntityModel());
     $writeState->addModel($state->getModel('entity-test'));
     parent::write($writeState, $input, $output);
 }
示例#4
0
 protected function configure()
 {
     parent::configure();
     $this->setName('full');
     $this->setDescription('Generate all available (without module skeleton)');
     $this->addArgument('module', InputArgument::REQUIRED, 'Module name');
     $this->addArgument('name', InputArgument::REQUIRED, 'Entity name');
     $this->addOption('rest', 'r', InputOption::VALUE_NONE, 'Generate RESTful controller');
 }
 protected function write(State $state, InputInterface $input, OutputInterface $output)
 {
     $writeState = new State($this->configWriter);
     if (!$input->getOption('no-repository')) {
         $writeState->addModel($state->getRepositoryModel());
     }
     if (!$input->getOption('no-trait')) {
         $writeState->addModel($state->getModel('repository-trait'));
     }
     parent::write($writeState, $input, $output);
 }
示例#6
0
 protected function configure()
 {
     parent::configure();
     $this->setName('options');
     $this->setDescription('Generate options, options DI trait, options factory and write to service.config.php');
     $this->addArgument('module', InputArgument::REQUIRED, 'Module name');
     $this->addArgument('name', InputArgument::REQUIRED, 'Options name (will be append Options postfix)');
     $this->addOption('no-options', null, InputOption::VALUE_NONE, 'Disable options generation');
     $this->addOption('no-trait', null, InputOption::VALUE_NONE, 'Disable trait generation');
     $this->addOption('no-factory', null, InputOption::VALUE_NONE, 'Disable factory generation');
     $this->addOption('only-options', null, InputOption::VALUE_NONE, 'Generate only options');
     $this->addOption('only-trait', null, InputOption::VALUE_NONE, 'Generate only trait');
     $this->addOption('only-factory', null, InputOption::VALUE_NONE, 'Generate only factory');
 }
示例#7
0
 protected function configure()
 {
     parent::configure();
     $this->setName('service');
     $this->setDescription('Generate service, service DI trait, service factory, service test and write to service.config.php');
     $this->addArgument('module', InputArgument::REQUIRED, 'Module name');
     $this->addArgument('name', InputArgument::REQUIRED, 'Service name');
     $this->addOption('no-service', null, InputOption::VALUE_NONE, 'Disable service generation');
     $this->addOption('no-trait', null, InputOption::VALUE_NONE, 'Disable service trait generation');
     $this->addOption('no-factory', null, InputOption::VALUE_NONE, 'Disable service factory generation');
     $this->addOption('no-test', null, InputOption::VALUE_NONE, 'Disable service test generation');
     $this->addOption('only-service', null, InputOption::VALUE_NONE, 'Generate only service');
     $this->addOption('only-trait', null, InputOption::VALUE_NONE, 'Generate only trait');
     $this->addOption('only-factory', null, InputOption::VALUE_NONE, 'Generate only factory');
     $this->addOption('only-test', null, InputOption::VALUE_NONE, 'Generate only test');
 }
 protected function write(State $state, InputInterface $input, OutputInterface $output)
 {
     $writeState = new State($this->configWriter);
     $writeState->addModel($state->getControllerModel());
     parent::write($writeState, $input, $output);
 }