|
@@ 200-207 (lines=8) @@
|
| 197 |
|
* @return \Longman\TelegramBot\Telegram |
| 198 |
|
* @throws \Longman\TelegramBot\Exception\TelegramException |
| 199 |
|
*/ |
| 200 |
|
public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4') |
| 201 |
|
{ |
| 202 |
|
$this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding); |
| 203 |
|
ConversationDB::initializeConversation(); |
| 204 |
|
$this->mysql_enabled = true; |
| 205 |
|
|
| 206 |
|
return $this; |
| 207 |
|
} |
| 208 |
|
|
| 209 |
|
/** |
| 210 |
|
* Initialize Database external connection |
|
@@ 218-225 (lines=8) @@
|
| 215 |
|
* @return \Longman\TelegramBot\Telegram |
| 216 |
|
* @throws \Longman\TelegramBot\Exception\TelegramException |
| 217 |
|
*/ |
| 218 |
|
public function enableExternalMySql($external_pdo_connection, $table_prefix = null) |
| 219 |
|
{ |
| 220 |
|
$this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix); |
| 221 |
|
ConversationDB::initializeConversation(); |
| 222 |
|
$this->mysql_enabled = true; |
| 223 |
|
|
| 224 |
|
return $this; |
| 225 |
|
} |
| 226 |
|
|
| 227 |
|
/** |
| 228 |
|
* Get commands list |