PHP Class Longman\TelegramBot\Botan

Integration with http://botan.io statistics service for Telegram bots
Datei anzeigen Open project: akalongman/php-telegram-bot Class Usage Examples

Public Properties

Property Type Description
$command The actual command that is going to be reported

Protected Properties

Property Type Description
$shortener_url Url Shortener request url
$token Yandex AppMetrica application key
$track_url Tracker request url

Public Methods

Method Description
initializeBotan ( $token ) Initialize Botan
lock ( string $command = '' ) Lock function to make sure only the first command is reported ( in case commands are calling other commands $telegram->executedCommand() )
shortenUrl ( $url, $user_id ) : string Url Shortener function
track ( string $input, string $command = '' ) : boolean | string Track function

Method Details

initializeBotan() public static method

Initialize Botan
public static initializeBotan ( $token )
$token

lock() public static method

Lock function to make sure only the first command is reported ( in case commands are calling other commands $telegram->executedCommand() )
public static lock ( string $command = '' )
$command string

shortenUrl() public static method

Url Shortener function
public static shortenUrl ( $url, $user_id ) : string
$url
$user_id
return string

track() public static method

Track function
public static track ( string $input, string $command = '' ) : boolean | string
$input string
$command string
return boolean | string

Property Details

$command public_oe static_oe property

The actual command that is going to be reported
public static $command

$shortener_url protected_oe static_oe property

Url Shortener request url
protected static $shortener_url

$token protected_oe static_oe property

Yandex AppMetrica application key
protected static $token

$track_url protected_oe static_oe property

Tracker request url
protected static $track_url