PhpBotFramework  1.0.0
A framework for Telegram Bots' APIs.
Functions | Variables
Core(internal)

Functions

 DanySpin97\PhpBotFramework\Bot::processUpdate (array &$update)
 Dispatch each update to the right method (processMessage, processCallbackQuery, etc). More...
 
 DanySpin97\PhpBotFramework\CoreBot::__construct (string $token)
 Contrusct an empty bot. More...
 
 DanySpin97\PhpBotFramework\CoreBot::__destruct ()
 Destroy the object.
 
DanySpin97\PhpBotFramework\CoreBot::exec_curl_request ($url)
 Base core function to execute url request. More...
 

Variables

 DanySpin97\PhpBotFramework\CoreBot::$api_url
 Url request (containing $token).
 
 DanySpin97\PhpBotFramework\CoreBot::$ch
 Curl connection for request.
 

Detailed Description

Function Documentation

§ __construct()

DanySpin97\PhpBotFramework\CoreBot::__construct ( string  $token)

Contrusct an empty bot.

Construct a bot passing the token.

Parameters
$tokenToken given by .

§ exec_curl_request()

& DanySpin97\PhpBotFramework\CoreBot::exec_curl_request (   $url)
protected

Base core function to execute url request.

Parameters
$urlThe url to call using the curl session.

§ 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
$updateReference to the update received.
Returns
The id of the update processed.