mrjgreen / php-cli
Command component based on laravel's
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 5 378
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
This package is not auto-updated.
Last update: 2023-07-31 19:45:56 UTC
README
A standalone interface loosely matching the new laravel 4.0 cli interface
class ExecuteControllerCommand extends Command { /** * Execute the console command. * * @return void */ public function fire() { $controller = $this->getArgument('controller'); $this->info($controller); $action = $this->getArgument('action'); $this->error($action); $env = $this->getOption('env'); $this->info($env); $verbose = $this->getOption('verbose'); $this->line($verbose); if($this->confirm('Would you like to continue?')) { $password = $this->secret('Please enter a password:'); $this->info($password); $this->success('Complete!'); } } protected function getArguments() { return array( array('controller', self::REQUIRED), array('action', self::OPTIONAL), ); } protected function getOptions() { return array( array('env','e', self::OPTIONAL), array('verbose','v', self::VALUE_NONE), ); } } ExecuteControllerCommand::createFromCliArgs()->fire