class Command implements CommandInterface (View source)

Class Command.

Methods

string
getName()

Get Command Name.

setName($name)

Set Command Name.

string
getDescription()

Get Command Description.

setDescription($description)

Set Command Description.

Api
getTelegram()

Returns Telegram Instance.

getUpdate()

Returns Original Update.

string
getArguments()

Get Arguments passed to the command.

getCommandBus()

Returns an instance of Command Bus.

mixed
make($telegram, $arguments, $update)

Process Inbound Command.

mixed
handle($arguments)

Process the command.

mixed|string
__call($method, $arguments)

Magic Method to handle all ReplyWith Methods.

mixed
replyWithMessage($use_sendMessage_parameters)

Reply Chat with a message. You can use all the sendMessage() parameters except chat_id.

mixed
replyWithPhoto($use_sendPhoto_parameters)

Reply Chat with a Photo. You can use all the sendPhoto() parameters except chat_id.

mixed
replyWithAudio($use_sendAudio_parameters)

Reply Chat with an Audio message. You can use all the sendAudio() parameters except chat_id.

mixed
replyWithVideo($use_sendVideo_parameters)

Reply Chat with a Video. You can use all the sendVideo() parameters except chat_id.

mixed
replyWithVoice($use_sendVoice_parameters)

Reply Chat with a Voice message. You can use all the sendVoice() parameters except chat_id.

mixed
replyWithDocument($use_sendDocument_parameters)

Reply Chat with a Document. You can use all the sendDocument() parameters except chat_id.

mixed
replyWithSticker($use_sendSticker_parameters)

Reply Chat with a Sticker. You can use all the sendSticker() parameters except chat_id.

mixed
replyWithLocation($use_sendLocation_parameters)

Reply Chat with a Location. You can use all the sendLocation() parameters except chat_id.

mixed
replyWithChatAction($use_sendChatAction_parameters)

Reply Chat with a Chat Action. You can use all the sendChatAction() parameters except chat_id.

Details

at line 57
string getName()

Get Command Name.

Return Value

string

at line 69
Command setName($name)

Set Command Name.

Parameters

$name

Return Value

Command

at line 81
string getDescription()

Get Command Description.

Return Value

string

at line 93
Command setDescription($description)

Set Command Description.

Parameters

$description

Return Value

Command

at line 105
Api getTelegram()

Returns Telegram Instance.

Return Value

Api

at line 115
Update getUpdate()

Returns Original Update.

Return Value

Update

at line 125
string getArguments()

Get Arguments passed to the command.

Return Value

string

at line 135
CommandBus getCommandBus()

Returns an instance of Command Bus.

Return Value

CommandBus

at line 143
mixed make($telegram, $arguments, $update)

Process Inbound Command.

Parameters

$telegram
$arguments
$update

Return Value

mixed

at line 168
abstract mixed handle($arguments)

Process the command.

Parameters

$arguments

Return Value

mixed

at line 178
mixed|string __call($method, $arguments)

Magic Method to handle all ReplyWith Methods.

Parameters

$method
$arguments

Return Value

mixed|string

at line 22
mixed replyWithMessage($use_sendMessage_parameters)

Reply Chat with a message. You can use all the sendMessage() parameters except chat_id.

Parameters

$use_sendMessage_parameters

Return Value

mixed

at line 22
mixed replyWithPhoto($use_sendPhoto_parameters)

Reply Chat with a Photo. You can use all the sendPhoto() parameters except chat_id.

Parameters

$use_sendPhoto_parameters

Return Value

mixed

at line 22
mixed replyWithAudio($use_sendAudio_parameters)

Reply Chat with an Audio message. You can use all the sendAudio() parameters except chat_id.

Parameters

$use_sendAudio_parameters

Return Value

mixed

at line 22
mixed replyWithVideo($use_sendVideo_parameters)

Reply Chat with a Video. You can use all the sendVideo() parameters except chat_id.

Parameters

$use_sendVideo_parameters

Return Value

mixed

at line 22
mixed replyWithVoice($use_sendVoice_parameters)

Reply Chat with a Voice message. You can use all the sendVoice() parameters except chat_id.

Parameters

$use_sendVoice_parameters

Return Value

mixed

at line 22
mixed replyWithDocument($use_sendDocument_parameters)

Reply Chat with a Document. You can use all the sendDocument() parameters except chat_id.

Parameters

$use_sendDocument_parameters

Return Value

mixed

at line 22
mixed replyWithSticker($use_sendSticker_parameters)

Reply Chat with a Sticker. You can use all the sendSticker() parameters except chat_id.

Parameters

$use_sendSticker_parameters

Return Value

mixed

at line 22
mixed replyWithLocation($use_sendLocation_parameters)

Reply Chat with a Location. You can use all the sendLocation() parameters except chat_id.

Parameters

$use_sendLocation_parameters

Return Value

mixed

at line 22
mixed replyWithChatAction($use_sendChatAction_parameters)

Reply Chat with a Chat Action. You can use all the sendChatAction() parameters except chat_id.

Parameters

$use_sendChatAction_parameters

Return Value

mixed