SampleTask.php 949 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * SampleTask file
  4. *
  5. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  6. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  7. *
  8. * Licensed under The MIT License
  9. * For full copyright and license information, please see the LICENSE.txt
  10. * Redistributions of files must retain the above copyright notice
  11. *
  12. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  13. * @link http://cakephp.org CakePHP(tm) Project
  14. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  15. */
  16. namespace TestApp\Shell\Task;
  17. use Cake\Console\Shell;
  18. class SampleTask extends Shell
  19. {
  20. public function getOptionParser()
  21. {
  22. $parser = parent::getOptionParser();
  23. $parser->addOption('sample', [
  24. 'short' => 's',
  25. 'help' => 'This is a sample option for the sample task.',
  26. ]);
  27. return $parser;
  28. }
  29. }