Class Forwards_Driver_plesk

Description

Forwards_Driver_plesk implements the Forwards_Driver API for Plesk control panel servers.

Plesk 8.1 or later is required.

$Horde: forwards/lib/Driver/plesk.php,v 1.2.2.2 2009/01/06 15:22:46 jan Exp $

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

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/plesk.php (line 19)

Forwards_Driver
   |
   --Forwards_Driver_plesk
Variable Summary
 resource $_curl
 array $_details
 integer $_domain_id
Method Summary
 string currentTarget (string $password)
 void disableForwarding (string $password)
 void enableForwarding (string $password, string $target, [boolean $keeplocal = false])
 mixed isEnabledForwarding (string $password)
 boolean isKeepLocal (string $password)
 void _checkConfig (string $password)
 mixed _getUserDetails (string $password)
 void _parseResponse (Horde_DOM_Node $node,  &$array, array $array)
 boolean _request (string $password, string $packet)
Variables
resource $_curl (line 26)

The curl resource handler

array $_details = null (line 40)

The current forwards details.

integer $_domain_id (line 33)

The Plesk domain id of the current realm.

Inherited Variables

Inherited from Forwards_Driver

Forwards_Driver::$_params
Forwards_Driver::$_realm
Forwards_Driver::$_user
Methods
currentTarget (line 185)

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.
disableForwarding (line 95)

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.
enableForwarding (line 51)

Begins forwarding of mail for a user.

void enableForwarding (string $password, string $target, [boolean $keeplocal = false])
  • 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.
isEnabledForwarding (line 151)

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.
isKeepLocal (line 172)

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.
_checkConfig (line 249)

Checks if the realm has a specific configuration. If not, tries to fall back on the default configuration. If still not a valid configuration then returns an error.

void _checkConfig (string $password)
  • string $password: The password for the user.
_getUserDetails (line 202)

Retrieves the current forwards details for the user.

  • return: Target address if enabled, false if disabled, PEAR_Error on failure.
mixed _getUserDetails (string $password)
  • string $password: The password for user.
_parseResponse (line 342)

Parses the XML response body of the Plesk API call into a hash.

void _parseResponse (Horde_DOM_Node $node,  &$array, array $array)
  • Horde_DOM_Node $node: A DOM node object.
  • array $array: The result hash.
  • &$array
_request (line 298)

Connects to the Plesk RPC API server and sends a request.

  • return: True on success, PEAR_Error otherwise.
boolean _request (string $password, string $packet)
  • string $password: The password to connect with.
  • string $packet: The XML fragment for the request.

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:58 +0000 by phpDocumentor 1.4.3