PHP Class Longman\TelegramBot\ConversationDB

Inheritance: extends DB
Datei anzeigen Open project: akalongman/php-telegram-bot Class Usage Examples

Public Methods

Method Description
initializeConversation ( ) Initilize conversation table
insertConversation ( integer $user_id, integer $chat_id, string $command ) : boolean Insert the conversation in the database
selectConversation ( integer $user_id, integer $chat_id, boolean $limit = null ) : array | boolean Select a conversation from the DB
update ( string $table, array $fields_values, array $where_fields_values ) : boolean Update the conversation in the database
updateConversation ( array $fields_values, array $where_fields_values ) : boolean Update a specific conversation

Method Details

initializeConversation() public static method

Initilize conversation table
public static initializeConversation ( )

insertConversation() public static method

Insert the conversation in the database
public static insertConversation ( integer $user_id, integer $chat_id, string $command ) : boolean
$user_id integer
$chat_id integer
$command string
return boolean

selectConversation() public static method

Select a conversation from the DB
public static selectConversation ( integer $user_id, integer $chat_id, boolean $limit = null ) : array | boolean
$user_id integer
$chat_id integer
$limit boolean
return array | boolean

update() public static method

Update the conversation in the database
public static update ( string $table, array $fields_values, array $where_fields_values ) : boolean
$table string
$fields_values array
$where_fields_values array
return boolean

updateConversation() public static method

Update a specific conversation
public static updateConversation ( array $fields_values, array $where_fields_values ) : boolean
$fields_values array
$where_fields_values array
return boolean