Overview

Packages

  • Horde
    • Imsp

Classes

  • Horde_Imsp_Auth_Base
  • Horde_Imsp_Auth_CramMd5
  • Horde_Imsp_Auth_Imtest
  • Horde_Imsp_Auth_Plaintext
  • Horde_Imsp_Book
  • Horde_Imsp_Client_Base
  • Horde_Imsp_Client_Socket
  • Horde_Imsp_Exception
  • Horde_Imsp_Options
  • Horde_Imsp_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Imsp_Client_Base

The Horde_Imsp_Client base class.

Copyright 2003-2012 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.

Direct known subclasses

Horde_Imsp_Client_Socket
Abstract
Package: Horde\Imsp
Author: Michael Rubinsky mrubinsk@horde.org
Located at Horde/Imsp/Client/Base.php
Methods summary
public
# __construct( array $params )

Constructor function. Required parameters:

authObj  <Horde_Imsp_Auth>  The object to handle the authentication

Constructor function. Required parameters:

authObj  <Horde_Imsp_Auth>  The object to handle the authentication

Optional parameters:

server   <string>           The IMSP host
 port     <string>           The port the IMSP server listens on
 logger  <Horde_Log_Logger>  The logger.

Parameters

$params
Hash containing server parameters.
public static string
# quoteSpacedString( string $string )

Determines if a string needs to be quoted before sending to the server.

Determines if a string needs to be quoted before sending to the server.

Parameters

$string
String to be tested.

Returns

string
Original string, quoted if needed.
abstract public
# logout( )

Close connection and logout from IMSP server.

Close connection and logout from IMSP server.

abstract public string
# capability( )

Returns the raw capability response from the server.

Returns the raw capability response from the server.

Returns

string
The raw capability response.

Throws

Horde_Imsp_Exception
abstract public
# send( string $commandText, boolean $includeTag = true, boolean $sendCRLF = true, boolean $continuation = false )

Attempts to send a command to the server.

Attempts to send a command to the server.

Parameters

$commandText
Text to send to the server.
$includeTag
Determines if command tag is prepended.
$sendCRLF
Determines if CRLF is appended.
$continuation
Expect a command continuation response.

Throws

Horde_Imsp_Exception
abstract public mixed
# receive( )

Receives a single CRLF terminated server response string

Receives a single CRLF terminated server response string

Returns

mixed
'NO', 'BAD', 'OK', raw response.

Throws

Horde_Imsp_Exception
abstract public array
# getServerResponseChunks( )

Retrieves CRLF terminated response from server and splits it into an array delimited by a .

Retrieves CRLF terminated response from server and splits it into an array delimited by a .

Returns

array
The exploded string
abstract public string
# receiveStringLiteral( integer $length )

Receives fixed number of bytes from IMSP socket. Used when server returns a string literal.

Receives fixed number of bytes from IMSP socket. Used when server returns a string literal.

Parameters

$length
Number of bytes to read from socket.

Returns

string
Text of string literal.
abstract public boolean
# authenticate( boolean $login = true )

Attempts to login to IMSP server.

Attempts to login to IMSP server.

Parameters

$login
Should we remain logged in after auth?

Returns

boolean
Constants summary
string OCTET_COUNT
# '/({)([0-9]{1,})(\}$)/'
string MUST_USE_LITERAL
# '/[\x80-\xFF\\r\\n\"\\\\]/'
string MUST_QUOTE
# '/[\W]/i'
Properties summary
public string $host

String containing name/IP address of IMSP host.

String containing name/IP address of IMSP host.

# 'localhost'
public string $port

String containing port for IMSP server.

String containing port for IMSP server.

# '406'
public string $lastRawError

String buffer containing the last raw NO or BAD response from the server.

String buffer containing the last raw NO or BAD response from the server.

#
public Horde_Log_Logger $_logger

Logger

Logger

#
API documentation generated by ApiGen