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