PHP Класс Longman\TelegramBot\Botan

Integration with http://botan.io statistics service for Telegram bots
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$command The actual command that is going to be reported

Защищенные свойства (Protected)

Свойство Тип Описание
$shortener_url Url Shortener request url
$token Yandex AppMetrica application key
$track_url Tracker request url

Открытые методы

Метод Описание
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

Описание методов

initializeBotan() публичный статический Метод

Initialize Botan
public static initializeBotan ( $token )
$token

lock() публичный статический Метод

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() публичный статический Метод

Url Shortener function
public static shortenUrl ( $url, $user_id ) : string
$url
$user_id
Результат string

track() публичный статический Метод

Track function
public static track ( string $input, string $command = '' ) : boolean | string
$input string
$command string
Результат boolean | string

Описание свойств

$command публичное статическое свойство

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

$shortener_url защищенное статическое свойство

Url Shortener request url
protected static $shortener_url

$token защищенное статическое свойство

Yandex AppMetrica application key
protected static $token

$track_url защищенное статическое свойство

Tracker request url
protected static $track_url