Class IMP_IMAP

Description

The IMP_IMAP:: class facilitates connections to the IMAP/POP3 server via the c-client PHP extensions.

$Horde: imp/lib/IMAP.php,v 1.11.10.25 2009/03/19 10:28:16 jan Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

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

Located in /lib/IMAP.php (line 29)


	
			
Variable Summary
 integer $_mboxFlags
 string $_openMbox
 array $_openparams
 string $_pass
 boolean $_registered
 resource $_stream
 string $_user
Method Summary
 IMP_IMAP IMP_IMAP ([ $user = null], [ $pass = null])
 boolean changeMbox (string $mbox, [integer $flags = IMP_IMAP_READWRITE])
 resource openIMAPStream ([string $mbox = null], [integer $flags = IMP_IMAP_READWRITE])
 array protocolList ()
 void reopen ()
 IMP_IMAP &singleton ([ $user = null], [ $pass = null])
 resource stream ()
 void _onShutdown ()
 integer _toIMAPFlags (integer $flags)
Variables
integer $_mboxFlags = null (line 64)

The IMAP flags set in the currently open mailbox.

string $_openMbox = null (line 57)

The currently open mailbox.

array $_openparams = array() (line 71)

Parameters used in the last imap_open() call.

string $_pass (line 43)

The password for the mail server.

boolean $_registered = false (line 78)

Has the shutdown function been registered?

resource $_stream (line 50)

The current IMAP resource string.

string $_user (line 36)

The username for the server.

Methods
Constructor IMP_IMAP (line 104)

Constructor.

IMP_IMAP IMP_IMAP ([ $user = null], [ $pass = null])
  • $user
  • $pass
changeMbox (line 188)

Change the currently active IMP IMAP stream to a new mailbox (if necessary).

  • return: True on success, false on error.
boolean changeMbox (string $mbox, [integer $flags = IMP_IMAP_READWRITE])
  • string $mbox: The new mailbox.
  • integer $flags: Any IMP_IMAP_* flags.
openIMAPStream (line 123)

Open an IMAP stream.

  • return: The return from the imap_open() call.
resource openIMAPStream ([string $mbox = null], [integer $flags = IMP_IMAP_READWRITE])
  • string $mbox: A mailbox to open.
  • integer $flags: Any IMP_IMAP_* flags.
protocolList (line 275)

Returns the list of default IMAP/POP3 protocol connection information.

This function can be called statically.

  • return: The protocol configuration list.
array protocolList ()
reopen (line 367)

Reopens the IMAP connection.

  • since: IMP 4.3.4
void reopen ()
singleton (line 90)

Attempts to return a reference to a concrete IMP_IMAP instance.

It will only create a new instance if no IMP_IMAP instance currently exists.

This method must be invoked as: $imp_imap = &IMP_IMAP::singleton();

  • return: The concrete IMP_IMAP reference, or false on error.
IMP_IMAP &singleton ([ $user = null], [ $pass = null])
  • $user
  • $pass
stream (line 261)

Returns the active IMAP resource string.

  • return: The IMAP resource string.
  • since: IMP 4.2
resource stream ()
_onShutdown (line 166)

Perform needed activities on shutdown.

void _onShutdown ()
_toIMAPFlags (line 349)

Converts IMP_IMAP_* flags to imap_open() flags.

  • return: A flag bitmask suitable for imap_open() and imap_reopen().
integer _toIMAPFlags (integer $flags)
  • integer $flags: Any IMP_IMAP_* flags.

Documentation generated on Sun, 30 Jan 2011 05:28:12 +0000 by phpDocumentor 1.4.3