DemoCommand.php 422 B

12345678910111213141516171819
  1. <?php
  2. namespace TestApp\Command;
  3. use Cake\Console\Arguments;
  4. use Cake\Console\Command;
  5. use Cake\Console\ConsoleIo;
  6. class DemoCommand extends Command
  7. {
  8. public function execute(Arguments $args, ConsoleIo $io)
  9. {
  10. $io->quiet('Quiet!');
  11. $io->out('Demo Command!');
  12. $io->verbose('Verbose!');
  13. if ($args->hasArgumentAt(0)) {
  14. $io->out($args->getArgumentAt(0));
  15. }
  16. }
  17. }