[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Net/ -> IMSP.php (sommaire)

(pas de description)

Poids: 466 lignes (15 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Net_IMSP:: (17 méthodes):
  Net_IMSP()
  init()
  logout()
  capability()
  imspOpen()
  imspSend()
  imspReceive()
  getServerResponseChunks()
  receiveStringLiteral()
  _getNextCommandTag()
  quoteSpacedString()
  imspError()
  writeToLog()
  setLogger()
  _writeLogBuffer()
  factory()
  singleton()


Classe: Net_IMSP  - X-Ref

The Net_IMSP class provides a common interface to an IMSP server .

Required parameters:<pre>
'server'  Hostname of IMSP server.
'port'    Port of IMSP server.</pre>

$Horde: framework/Net_IMSP/IMSP.php,v 1.13.10.19 2006/02/10 04:58:26 selsky Exp $

Copyright 2003-2006 Michael Rubinsky <mrubinsk@horde.org>

See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Net_IMSP($params)   X-Ref
Constructor function.

param: array $params Hash containing server parameters.

init()   X-Ref
Initialization function to be called after object is returned.  This
allows errors to occur and not break the script.

return: mixed  True on success PEAR_Error on connection failure.

logout()   X-Ref
Logs out of the server and closes the IMSP stream


capability()   X-Ref
Returns the raw capability response from the server.

return: string  The raw capability response.

imspOpen()   X-Ref
Attempts to open an IMSP socket with the server.

return: mixed  True on success PEAR_Error on failure.

imspSend($commandText, $includeTag=true, $sendCRLF=true)   X-Ref
Attempts to send a command to the server.

param: string  $commandText Text to send to the server.
param: boolean $includeTag  Determines if command tag is prepended.
param: boolean  $sendCRLF   Determines if CRLF is appended.
return: mixed   True on success PEAR_Error on failure.

imspReceive()   X-Ref
Receives a single CRLF terminated server response string

return: mixed 'NO', 'BAD', 'OK', raw response or PEAR_Error.

getServerResponseChunks()   X-Ref
Retrieves CRLF terminated response from server and splits it into
an array delimited by a <space>.

return: array result from explode().

receiveStringLiteral($length)   X-Ref
Pas de description

_getNextCommandTag()   X-Ref
Increments the IMSP command tag token.

return: string Next command tag.

quoteSpacedString($string)   X-Ref
Determines if a string needs to be quoted before sending to the server.

param: string $string  String to be tested.
return: string Original string quoted if needed.

imspError($err = '', $file=__FILE__, $line=__LINE__)   X-Ref
Raises an IMSP error.  Basically, only writes
error out to the horde logfile and returns PEAR_Error

param: string $err    Either PEAR_Error object or text to write to log.
param: string $file   File name where error occured.
param: integer $line  Line number where error occured.

writeToLog($message, $file = __FILE__,$line = __LINE__, $priority = PEAR_LOG_INFO)   X-Ref
Writes a message to the IMSP logfile.

param: string $message  Text to write.

setLogger($params)   X-Ref
Creates a new Log object based on $params

param: array  $params Log object parameters.
return: mixed  True on success or PEAR_Error on failure.

_writeLogBuffer()   X-Ref
Writes out contents of $_logBuffer to log file.  Allows messages
to be logged during initialization of object before Log object is
instantiated.


factory($driver, $params)   X-Ref
Attempts to create a Net_IMSP object based on $driver.
Must be called as $imsp = &Net_IMSP::factory($driver, $params);

param: string $driver Type of Net_IMSP object to return.
param: mixed  $params  Any parameters needed by the Net_IMSP object.
return: mixed  The requested Net_IMSP object or PEAR_Error on failure.

singleton($driver, $params)   X-Ref
Attempts to return a Net_IMSP object based on $driver.  Only
creates a new object if one with the same parameters already
doesn't exist.
Must be called as $imsp = &Net_IMSP::singleton($driver, $params);

param: string $driver Type of Net_IMSP object to return.
param: mixed  $params Any parameters needed by the Net_IMSP object.
return: mixed  Reference to the Net_IMSP object or PEAR_Error on failure.



Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7