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
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_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