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