Property | Type | Description | |
---|---|---|---|
$notes | array | Notes to be stored |
Property | Type | Description | |
---|---|---|---|
$chat_id | integer | Telegram chat id | |
$command | string | Command to be executed if the conversation is active | |
$conversation | array | All information fetched from the database | |
$protected_notes | array | Notes stored inside the conversation | |
$user_id | integer | Telegram user id |
Method | Description | |
---|---|---|
__construct ( integer $user_id, integer $chat_id, string $command = null ) | Conversation contructor to initialize a new conversation | |
cancel ( ) : boolean | Cancel the current conversation | |
exists ( ) : boolean | Check if the conversation already exists | |
getCommand ( ) : string | null | Retrieve the command to execute from the conversation | |
stop ( ) : boolean | Delete the current conversation | |
update ( ) : boolean | Store the array/variable in the database with json_encode() function |
Method | Description | |
---|---|---|
clear ( ) : boolean | Clear all conversation variables. | |
load ( ) : boolean | Load the conversation from the database | |
start ( ) : boolean | Start a new conversation if the current command doesn't have one yet | |
updateStatus ( string $status ) : boolean | Update the status of the current conversation |
public getCommand ( ) : string | null | ||
return | string | null |
protected updateStatus ( string $status ) : boolean | ||
$status | string | |
return | boolean |
protected string $command | ||
return | string |
protected array $conversation | ||
return | array |
protected array $protected_notes | ||
return | array |