Skip to content

Instantly share code, notes, and snippets.

@app2641
Last active December 11, 2015 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save app2641/4680260 to your computer and use it in GitHub Desktop.
Save app2641/4680260 to your computer and use it in GitHub Desktop.
<?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