CommandBus
class CommandBus (View source)
Class CommandBus.
Methods
__construct(
Api $telegram)
Instantiate Command Bus.
array
getCommands()
Returns the list of commands.
addCommands(
array $commands)
Add a list of commands.
removeCommand($name)
Remove a command from the list.
removeCommands(
array $names)
Removes a list of commands.
array
parseCommand($text)
Parse a Command for a Match.
mixed
execute($name, $arguments, $message)
Execute the command.
Details
at line 31
__construct(
Api $telegram)
Instantiate Command Bus.
at line 41
array
getCommands()
Returns the list of commands.
at line 53
CommandBus
addCommands(
array $commands)
Add a list of commands.
at line 71
CommandBus
addCommand(
CommandInterface|string $command)
Add a command to the commands list.
at line 117
CommandBus
removeCommand($name)
Remove a command from the list.
at line 131
CommandBus
removeCommands(
array $names)
Removes a list of commands.
at line 150
Update
handler($message,
Update $update)
Handles Inbound Messages and Executes Appropriate Command.
at line 172
array
parseCommand($text)
Parse a Command for a Match.
at line 192
mixed
execute($name, $arguments, $message)
Execute the command.