Class Forwards_Driver_customsql

Description

Forwards_Driver_sql:: implements the Forwards_Driver API for SQL servers.

$Horde: forwards/lib/Driver/customsql.php,v 1.13.2.8 2009/12/07 12:31:55 jan Exp $

Copyright 2004-2007 Kendrick Vargas <ken@hudat.com>

See the enclosed file LICENSE for license information (BSDL). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.

Located in /lib/Driver/customsql.php (line 17)

Forwards_Driver
   |
   --Forwards_Driver_customsql
Direct descendents
Class Description
 class Forwards_Driver_postfixadmin Forwards_Driver_postfixadmin implements the Forwards_Driver API for SQL servers managed by Postfix Admin (http://postfixadmin.sourceforge.net/).
 class Forwards_Driver_sql Forwards_Driver_sql:: implements the Forwards_Driver API for SQL servers.
Variable Summary
 boolean $_connected
 DB $_db
Method Summary
 Forwards_Driver_customsql Forwards_Driver_customsql (string $user, string $realm, [array $params = null])
 string currentTarget (string $password)
 void disableForwarding (string $password)
 void enableForwarding (string $password, string $target, boolean $keeplocal)
 mixed isEnabledForwarding (string $password)
 boolean isKeepLocal (string $password)
 string _buildUsername ()
 boolean _connect ()
 void _disableForwarding (string $query, string $password)
 void _enableForwarding (string $query, string $password, string $target, [boolean $keeplocal = null])
 array _getUserDetails (string $password)
Variables
boolean $_connected = false (line 31)

State of SQL connection.

DB $_db (line 24)

SQL connection object.

array $_requiredParams = array('phptype', 'query_select', 'query_set',
'query_disable', 'column_target',
'column_keeplocal')
(line 38)

List of required parameters.


Redefined in descendants as:

Inherited Variables

Inherited from Forwards_Driver

Forwards_Driver::$_params
Forwards_Driver::$_realm
Forwards_Driver::$_user
Methods
Constructor Forwards_Driver_customsql (line 49)

Constructor.

Forwards_Driver_customsql Forwards_Driver_customsql (string $user, string $realm, [array $params = null])
  • string $user: A user name.
  • string $realm: The realm of the user.
  • array $params: A hash containing connection parameters.
currentTarget (line 214)

Retrieves current target of mail redirection for a user.

  • return: The current forwarding mail address, false if no forwarding is set, or PEAR_Error on error.
string currentTarget (string $password)
  • string $password: The password of the user.

Redefinition of:
Forwards_Driver::currentTarget()
Retrieves current target of mail redirection for a user.

Redefined in descendants as:
disableForwarding (line 120)

Stops forwarding of mail for a user.

void disableForwarding (string $password)
  • string $password: The password of the user.

Redefinition of:
Forwards_Driver::disableForwarding()
Stops forwarding of mail for a user.

Redefined in descendants as:
enableForwarding (line 66)

Begins forwarding of mail for a user.

void enableForwarding (string $password, string $target, boolean $keeplocal)
  • string $password: The password of the user.
  • string $target: The email address that mail should be forwarded to.
  • boolean $keeplocal: Keep a copy of forwarded mail in the local mailbox.

Redefinition of:
Forwards_Driver::enableForwarding()
Begins forwarding of mail for a user.

Redefined in descendants as:
isEnabledForwarding (line 173)

Retrieves current state of mail redirection for a user.

  • return: Returns 'Y' if forwarding is enabled for the user, 'N' if forwarding is currently disabled, false if the status cannot be determined, and PEAR_Error on error.
mixed isEnabledForwarding (string $password)
  • string $password: The password of the user.

Redefinition of:
Forwards_Driver::isEnabledForwarding()
Retrieves current state of mail redirection for a user.

Redefined in descendants as:
isKeepLocal (line 193)

Checks if user is keeping a local copy of forwarded mail.

  • return: True if user is keeping a local copy of mail, otherwise false.
boolean isKeepLocal (string $password)
  • string $password: The password of the user.

Redefinition of:
Forwards_Driver::isKeepLocal()
Checks if user is keeping a local copy of forwarded mail.

Redefined in descendants as:
_buildUsername (line 278)

Builds a username based on presence of realm.

  • return: Fully qualified username.
string _buildUsername ()
_connect (line 294)

Does an SQL connect and logs in as user with privilege to change vacation.

  • return: True or PEAR_Error based on success of connect.
boolean _connect ()
_disableForwarding (line 132)

Execute the query that stops forwarding of mail for a user.

void _disableForwarding (string $query, string $password)
  • string $query: The query to execute, including placeholders.
  • string $password: The password of the user.
_enableForwarding (line 82)

Execute the query that begins forwarding of mail for a user.

void _enableForwarding (string $query, string $password, string $target, [boolean $keeplocal = null])
  • string $query: The query to execute, including placeholders.
  • string $password: The password of the user.
  • string $target: The email address that mail should be forwarded to.
  • boolean $keeplocal: Keep a copy of forwarded mail in the local mailbox.
_getUserDetails (line 233)

Retrieves user details from the backend.

  • return: Hash with user details, or PEAR_Error.
array _getUserDetails (string $password)
  • string $password: The password of the user.

Inherited Methods

Inherited From Forwards_Driver

 Forwards_Driver::Forwards_Driver()
 Forwards_Driver::currentTarget()
 Forwards_Driver::disableForwarding()
 Forwards_Driver::enableForwarding()
 Forwards_Driver::factory()
 Forwards_Driver::getUser()
 Forwards_Driver::isEnabledForwarding()
 Forwards_Driver::isKeepLocal()
 Forwards_Driver::_makeEmailAddress()

Documentation generated on Sun, 30 Jan 2011 05:11:57 +0000 by phpDocumentor 1.4.3