PHP Класс PAGI\Client\Impl\ClientImpl

PHP Version 5
Автор: Marcelo Gornstein ([email protected])
Наследование: extends PAGI\Client\AbstractClient
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
getInstance ( array $options = [] ) : ClientImpl Returns a client instance for this call.

Защищенные методы

Метод Описание
__construct ( array $options = [] ) : void Constructor.
close ( ) : void Closes the connection to agi.
open ( ) : void Opens connection to agi. Will also read initial channel variables given by asterisk when launching the agi.
read ( ) : string Reads input from asterisk.
send ( string $text ) : Result Sends a command to asterisk. Returns an array with: [0] => AGI Result (3 digits) [1] => Command result [2] => Result data.

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

__construct() защищенный Метод

Note: The client accepts an array with options. The available options are stdin => Optional. If set, should contain an already open stream from where the client will read data (useful to make it interact with fastagi servers or even text files to mock stuff when testing). If not set, stdin will be used by the client. stdout => Optional. Same as stdin but for the output of the client.
protected __construct ( array $options = [] ) : void
$options array Optional properties.
Результат void

close() защищенный Метод

Closes the connection to agi.
protected close ( ) : void
Результат void

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

Returns a client instance for this call.
public static getInstance ( array $options = [] ) : ClientImpl
$options array Optional properties.
Результат ClientImpl

open() защищенный Метод

Opens connection to agi. Will also read initial channel variables given by asterisk when launching the agi.
protected open ( ) : void
Результат void

read() защищенный Метод

Reads input from asterisk.
protected read ( ) : string
Результат string

send() защищенный Метод

Sends a command to asterisk. Returns an array with: [0] => AGI Result (3 digits) [1] => Command result [2] => Result data.
protected send ( string $text ) : Result
$text string Command
Результат Result