PHP Class Longman\TelegramBot\Entities\ServerResponse

Inheritance: extends Entity
Afficher le fichier Open project: akalongman/php-telegram-bot Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( array $data, string $bot_name ) ServerResponse constructor.
isOk ( ) : boolean If response is ok
printError ( ) : string Print error

Méthodes protégées

Méthode Description
isAssoc ( array $array ) : boolean Check if array is associative

Private Methods

Méthode Description
createResultObject ( array $result, string $bot_name ) : Chat | ChatMember | Longman\TelegramBot\Entities\File | Message | Longman\TelegramBot\Entities\User | UserProfilePhotos | Longman\TelegramBot\Entities\WebhookInfo Create and return the object of the received result
createResultObjects ( array $result, string $bot_name ) : null | ChatMember[] | Update[] Create and return the objects array of the received result

Method Details

__construct() public méthode

ServerResponse constructor.
public __construct ( array $data, string $bot_name )
$data array
$bot_name string

isAssoc() protected méthode

Check if array is associative
protected isAssoc ( array $array ) : boolean
$array array
Résultat boolean

isOk() public méthode

If response is ok
public isOk ( ) : boolean
Résultat boolean

printError() public méthode

Print error
public printError ( ) : string
Résultat string