/** * {@inheritdoc} */ protected function execute(Input $input, Output $output) { if (null === $this->command) { $this->command = $this->getConsole()->find($input->getArgument('command_name')); } $output->describe($this->command, ['raw_text' => $input->getOption('raw')]); $this->command = null; }
protected function execute(Input $input, Output $output) { if ($input->hasArgument('module')) { $module = $input->getArgument('module') . DS; } else { $module = ''; } $content = '<?php ' . PHP_EOL . $this->buildCacheContent($module); if (!is_dir(RUNTIME_PATH . $module)) { @mkdir(RUNTIME_PATH . $module, 0755, true); } file_put_contents(RUNTIME_PATH . $module . 'init' . EXT, $content); $output->writeln('<info>Succeed!</info>'); }
protected function execute(Input $input, Output $output) { $name = trim($input->getArgument('name')); $classname = $this->getClassName($name); $pathname = $this->getPathName($classname); if (is_file($pathname)) { $output->writeln('<error>' . $this->type . ' already exists!</error>'); return false; } if (!is_dir(dirname($pathname))) { mkdir(strtolower(dirname($pathname)), 0755, true); } file_put_contents($pathname, $this->buildClass($classname)); $output->writeln('<info>' . $this->type . ' created successfully.</info>'); }
/** * {@inheritdoc} */ protected function execute(Input $input, Output $output) { $output->describe($this->getConsole(), ['raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace')]); }
/** * {@inheritdoc} */ protected function execute(Input $input, Output $output) { $helper = new DescriptorHelper(); $helper->describe($output, $this->getConsole(), ['raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace')]); }