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

Открытые свойства

Свойство Тип Описание
$_logger Horde_Log_Logger Logger
$host string String containing name/IP address of IMSP host.
$lastRawError string String buffer containing the last raw NO or BAD response from the server.
$port string String containing port for IMSP server.

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

Свойство Тип Описание
$_authObj Horde_Imsp_Auth The auth object
$_commandCount integer Current command count
$_commandPrefix string Current command prefix
$_lastCommandTag string Command tag last used.
$_tag string Currently in-use command tag

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

Метод Описание
__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 ( ) Close connection and logout from IMSP server.
quoteSpacedString ( string $string ) : string Determines if a string needs to be quoted before sending to the server.
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.

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

Метод Описание
_getNextCommandTag ( ) : string Increments the IMSP command tag token.

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

__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.

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

Increments the IMSP command tag token.
protected _getNextCommandTag ( ) : string
Результат string Next command tag.

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

Attempts to login to IMSP server.
abstract 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.
abstract public capability ( ) : string
Результат string The raw capability response.

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

Retrieves CRLF terminated response from server and splits it into an array delimited by a .
abstract public getServerResponseChunks ( ) : array
Результат array The exploded string

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

Close connection and logout from IMSP server.
abstract public logout ( )

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

Determines if a string needs to be quoted before sending to the server.
public static quoteSpacedString ( string $string ) : string
$string string String to be tested.
Результат string Original string, quoted if needed.

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

Receives a single CRLF terminated server response string
abstract 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.
abstract 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.
abstract 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 защищенное свойство

The auth object
protected Horde_Imsp_Auth $_authObj
Результат Horde_Imsp_Auth

$_commandCount защищенное свойство

Current command count
protected int $_commandCount
Результат integer

$_commandPrefix защищенное свойство

Current command prefix
protected string $_commandPrefix
Результат string

$_lastCommandTag защищенное свойство

Command tag last used.
protected string $_lastCommandTag
Результат string

$_logger публичное свойство

Logger
public Horde_Log_Logger $_logger
Результат Horde_Log_Logger

$_tag защищенное свойство

Currently in-use command tag
protected string $_tag
Результат string

$host публичное свойство

String containing name/IP address of IMSP host.
public string $host
Результат string

$lastRawError публичное свойство

String buffer containing the last raw NO or BAD response from the server.
public string $lastRawError
Результат string

$port публичное свойство

String containing port for IMSP server.
public string $port
Результат string