Registers a command
public addCommand ( callback $callback, string $alias = null, boolean $default = false ) : |
||
$callback | callback | Associated class name, function name, Command instance or closure |
$alias | string | Command name to be used in the shell |
$default | boolean | True to set the command as the default one |
return |
/** * Registers a callback to call when a command is * executed * * @param string $command * @param callback $callback */ public static function register($command, $callback) { self::$console->addCommand($callback, $command); }