PHP 클래스 Horde_Imsp_Client_Socket, horde

Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
저자: Michael Rubinsky ([email protected])
상속: extends Horde_Imsp_Client_Base
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_authObj Horde_Imsp_Auth_Base
$_stream resource Stream handle

공개 메소드들

메소드 설명
__construct ( array $params ) Constructor function.
authenticate ( boolean $login = true ) : boolean Attempts to login to IMSP server.
capability ( ) : string Returns the raw capability response from the server.
getServerResponseChunks ( ) : array Retrieves CRLF terminated response from server and splits it into an array delimited by a .
logout ( ) Logs out of the server and closes the IMSP stream
receive ( ) : mixed Receives a single CRLF terminated server response string
receiveStringLiteral ( integer $length ) : string Receives fixed number of bytes from IMSP socket. Used when server returns a string literal.
send ( string $commandText, boolean $includeTag = true, boolean $sendCRLF = true, boolean $continuation = false ) Attempts to send a command to the server.

보호된 메소드들

메소드 설명
_imspOpen ( ) Attempts to open an IMSP socket with the server.

메소드 상세

__construct() 공개 메소드

Required parameters:
 authObj    The object to handle the authentication
Optional parameters:
 server              The IMSP host
 port                The port the IMSP server listens on
 logger    The logger.
public __construct ( array $params )
$params array Hash containing server parameters.

_imspOpen() 보호된 메소드

Attempts to open an IMSP socket with the server.
protected _imspOpen ( )

authenticate() 공개 메소드

Attempts to login to IMSP server.
public authenticate ( boolean $login = true ) : boolean
$login boolean Should we remain logged in after auth?
리턴 boolean

capability() 공개 메소드

Returns the raw capability response from the server.
public capability ( ) : string
리턴 string The raw capability response.

getServerResponseChunks() 공개 메소드

Retrieves CRLF terminated response from server and splits it into an array delimited by a .
public getServerResponseChunks ( ) : array
리턴 array The exploded string

logout() 공개 메소드

Logs out of the server and closes the IMSP stream
public logout ( )

receive() 공개 메소드

Receives a single CRLF terminated server response string
public receive ( ) : mixed
리턴 mixed 'NO', 'BAD', 'OK', raw response.

receiveStringLiteral() 공개 메소드

Receives fixed number of bytes from IMSP socket. Used when server returns a string literal.
public receiveStringLiteral ( integer $length ) : string
$length integer Number of bytes to read from socket.
리턴 string Text of string literal.

send() 공개 메소드

Attempts to send a command to the server.
public send ( string $commandText, boolean $includeTag = true, boolean $sendCRLF = true, boolean $continuation = false )
$commandText string Text to send to the server.
$includeTag boolean Determines if command tag is prepended.
$sendCRLF boolean Determines if CRLF is appended.
$continuation boolean Expect a command continuation response.

프로퍼티 상세

$_authObj 보호되어 있는 프로퍼티

protected Horde_Imsp_Auth_Base $_authObj
리턴 Horde_Imsp_Auth_Base

$_stream 보호되어 있는 프로퍼티

Stream handle
protected resource $_stream
리턴 resource