Свойство | Type | Description | |
---|---|---|---|
$notes | array | Notes to be stored |
Свойство | 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 |
Méthode | 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 |
Méthode | 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 | ||
Résultat | string | null |
protected updateStatus ( string $status ) : boolean | ||
$status | string | |
Résultat | boolean |
protected string $command | ||
Résultat | string |
protected array $conversation | ||
Résultat | array |
protected array $protected_notes | ||
Résultat | array |