Core of the framework.
More...
Core of the framework.
§ __construct()
| DanySpin97\PhpBotFramework\CoreBot::__construct |
( |
string |
$token | ) |
|
Contrusct an empty bot.
Construct a bot passing the token.
- Parameters
-
§ exec_curl_request()
| DanySpin97\PhpBotFramework\CoreBot::exec_curl_request |
( |
|
$url | ) |
|
|
protected |
Core function to execute url request.
- Parameters
-
| $url | The url to call using the curl session. |
- Returns
- Url response, false on error.
§ processUpdate()
| DanySpin97\PhpBotFramework\Bot::processUpdate |
( |
array |
$update | ) |
|
Dispatch each update to the right method (processMessage, processCallbackQuery, etc).
Set $chat_id for each update, $text, $data and $query are set for each update that contains them. It also calls commands for each updates, before process methods.
- Parameters
-
| $update | Reference to the update received. |
- Returns
- The id of the update processed.