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