You can pass:
* An object with handler methods.
* A callable that receives a {@link Command} and returns an object with
handler methods.
The name of the executed handler method can be configured with
{@link setHandlerMethod()}. By default, the method handle() is
executed.
public setHandler ( object | callback $handler ) : |
||
$handler | object | callback | The command handler or the callable creating a new command handler on demand. |
Результат | The current instance. |