PHP 클래스 PAGI\Client\Impl\ClientImpl

PHP Version 5
저자: Marcelo Gornstein ([email protected])
상속: extends PAGI\Client\AbstractClient
파일 보기 프로젝트 열기: marcelog/pagi 1 사용 예제들

공개 메소드들

메소드 설명
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