Doccomment can now override context command name
This commit is contained in:
parent
ae17abb6c1
commit
81dea747b2
@ -17,6 +17,7 @@ class MyCommand extends Command
|
||||
class MyContext extends Context
|
||||
{
|
||||
/**
|
||||
* @command testme
|
||||
* @args
|
||||
* @help Useful test!
|
||||
*/
|
||||
|
@ -41,7 +41,8 @@ class Context
|
||||
$info[$key] = $value;
|
||||
}
|
||||
if (count($info)>0) {
|
||||
$this->addCommand($method->getName(), [$this, $method->getName()], $info);
|
||||
$cmdName = array_key_exists("command",$info)?$info["command"]:$method->getName();
|
||||
$this->addCommand($cmdName, [$this, $method->getName()], $info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user