|
@@ 188-195 (lines=8) @@
|
| 185 |
|
* @return \Longman\TelegramBot\Telegram |
| 186 |
|
* @throws \Longman\TelegramBot\Exception\TelegramException |
| 187 |
|
*/ |
| 188 |
|
public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4') |
| 189 |
|
{ |
| 190 |
|
$this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding); |
| 191 |
|
ConversationDB::initializeConversation(); |
| 192 |
|
$this->mysql_enabled = true; |
| 193 |
|
|
| 194 |
|
return $this; |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
/** |
| 198 |
|
* Initialize Database external connection |
|
@@ 206-213 (lines=8) @@
|
| 203 |
|
* @return \Longman\TelegramBot\Telegram |
| 204 |
|
* @throws \Longman\TelegramBot\Exception\TelegramException |
| 205 |
|
*/ |
| 206 |
|
public function enableExternalMySql($external_pdo_connection, $table_prefix = null) |
| 207 |
|
{ |
| 208 |
|
$this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix); |
| 209 |
|
ConversationDB::initializeConversation(); |
| 210 |
|
$this->mysql_enabled = true; |
| 211 |
|
|
| 212 |
|
return $this; |
| 213 |
|
} |
| 214 |
|
|
| 215 |
|
/** |
| 216 |
|
* Get commands list |