Last active
December 11, 2015 23:58
-
-
Save app2641/4680260 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Rasp\Commands; | |
class Test extends Base\AbstractCommand | |
{ | |
/** | |
* コマンドの実行 | |
* | |
* @author app2641 | |
**/ | |
public function execute (Array $params) | |
{ | |
try { | |
if (! isset($params[0])) { | |
throw new \InvalidArgumentException('invalid argument!'); | |
} | |
echo $params[0].PHP_EOL; | |
} catch (\Exception $e) { | |
$this->errorLog($e->getMessage()); | |
} | |
} | |
/** | |
* コマンドリストに表示するヘルプメッセージを表示する | |
* | |
* @author app2641 | |
**/ | |
public static function help () | |
{ | |
/* write help message */ | |
$msg = '引数に渡したStringをコンソールに表示します。'; | |
return $msg; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment