@@ 207-214 (lines=8) @@ | ||
204 | * @return \Longman\TelegramBot\Telegram |
|
205 | * @throws \Longman\TelegramBot\Exception\TelegramException |
|
206 | */ |
|
207 | public function enableMySql(array $credential, $table_prefix = null, $encoding = 'utf8mb4') |
|
208 | { |
|
209 | $this->pdo = DB::initialize($credential, $this, $table_prefix, $encoding); |
|
210 | DB::setEnabled(true); |
|
211 | ConversationDB::initializeConversation(); |
|
212 | ||
213 | return $this; |
|
214 | } |
|
215 | ||
216 | /** |
|
217 | * Initialize Database external connection |
|
@@ 225-232 (lines=8) @@ | ||
222 | * @return \Longman\TelegramBot\Telegram |
|
223 | * @throws \Longman\TelegramBot\Exception\TelegramException |
|
224 | */ |
|
225 | public function enableExternalMySql($external_pdo_connection, $table_prefix = null) |
|
226 | { |
|
227 | $this->pdo = DB::externalInitialize($external_pdo_connection, $this, $table_prefix); |
|
228 | DB::setEnabled(true); |
|
229 | ConversationDB::initializeConversation(); |
|
230 | ||
231 | return $this; |
|
232 | } |
|
233 | ||
234 | /** |
|
235 | * Get commands list |