addCommand() public method

Registers a command
public addCommand ( callback $callback, string $alias = null, boolean $default = false ) : Console
$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 Console
Exemplo n.º 1
0
 /**
  * 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);
 }