Class Vacation_Driver

Description

Vacation_Driver:: defines an API for implementing vacation backends for the vacation module.

$Horde: vacation/lib/Driver.php,v 1.35.2.9 2009/12/30 16:23:29 jan Exp $

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

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

Located in /lib/Driver.php (line 18)


	
			
Direct descendents
Class Description
 class Vacation_Driver_customsql Vacation_Driver_sql implements the Vacation_Driver API for SQL servers.
 class Vacation_Driver_forwards Vacation_Driver_forwards:: implements the Vacation_Driver API for ftp driven dot-forward compliant mail servers.
 class Vacation_Driver_ldap Vacation_Driver_ldap:: implements the Vacation_Driver API for LDAP-compliant mail servers (such as Exim).
 class Vacation_Driver_sql Vacation_Driver_sql:: implements the Vacation_Driver API for SQL servers.
 class Vacation_Driver_plesk Vacation_Driver_plesk implements the Vacation_Driver API for Plesk control panel servers.
Variable Summary
 string $_from
 string $_message
 array $_params
 string $_realm
 string $_subject
 string $_user
Method Summary
 Vacation_Driver Vacation_Driver (string $user, [array $params = array()])
 string currentFrom (string $password)
 string currentMessage (string $password)
 string currentSubject (string $password)
 mixed factory (string $user, [string $driver = null], [array $params = null])
 string getFrom ()
 mixed getParam (string $param)
 string getUser ()
 boolean hasCapability (string $capability)
 mixed isEnabled (string $password)
 void setVacation (string $password, string $message, string $subject, string $from, [string $alias = ''])
 void unsetVacation (string $password)
 string _buildMessage (string $message, string $subject, string $from)
 string _encryptPassword (string $plaintext, [string $salt = ''])
 array _getUserDetails (string $password)
 string _makeEmailAddress (string $user, string $realm)
 array _parseMessage (string $message)
 void _processMessage (string $password)
Variables
array $capabilities = array('changeFrom' => true) (line 70)

An array of capabilities, so that the driver can report which operations it supports and which it doesn't.

  • 'changeFrom' permits the user to change the From: header.


Redefined in descendants as:
string $_from (line 60)

The current vacation From: address.

string $_message (line 46)

The current vacation message.

array $_params (line 39)

Hash containing configuration data.

string $_realm (line 32)

The user's realm.

string $_subject (line 53)

The current vacation subject.

string $_user (line 25)

The current user name.

Methods
Constructor Vacation_Driver (line 78)

Constructor.

Vacation_Driver Vacation_Driver (string $user, [array $params = array()])
  • string $user: A user name.
  • array $params: Configuration parameters for the backend.
currentFrom (line 228)

Retrieves current vacation From: address.

  • return: The current vacation From: address, or false if none.
string currentFrom (string $password)
  • string $password: The password for user.

Redefined in descendants as:
currentMessage (line 198)

Retrieves current vacation message.

  • return: The current vacation message, or false if none.
string currentMessage (string $password)
  • string $password: The password for user.
currentSubject (line 213)

Retrieves current vacation subject.

  • return: The current vacation subject, or false if none.
string currentSubject (string $password)
  • string $password: The password for user.
factory (line 455)

Attempts to return a concrete Vacation_Driver instance based on $driver.

  • return: The newly created concrete Vacation_Driver instance, or false on an error.
mixed factory (string $user, [string $driver = null], [array $params = null])
  • string $user: A user name.
  • string $driver: The type of concrete Vacation_Driver subclass to return. The class name is based on the vacation driver ($driver). The code is dynamically included.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.
getFrom (line 371)

Returns the default From: address of the current user.

  • return: The default From: address.
string getFrom ()
getParam (line 117)

Return a parameter value.

  • return: The parameter value, or null if not found.
mixed getParam (string $param)
  • string $param: The parameter to check in.

Redefined in descendants as:
getUser (line 129)

Returns the current user.

  • return: The current user name.
string getUser ()
hasCapability (line 105)

Queries the current Driver object to find out if it supports the given capability.

  • return: Whether or not the capability is supported.
boolean hasCapability (string $capability)
  • string $capability: The capability to test for.
isEnabled (line 171)

Retrieves status of vacation for a user.

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

Sets up vacation notices for a user.

  • abstract:
void setVacation (string $password, string $message, string $subject, string $from, [string $alias = ''])
  • string $password: The password for the user.
  • string $message: The text of the vacation notice.
  • string $subject: The subject of the vacation notice.
  • string $from: The From: address of the vacation notice.
  • string $alias: The alias email address.

Redefined in descendants as:
unsetVacation (line 157)

Disables vacation notices for a user.

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

Redefined in descendants as:
_buildMessage (line 245)

Builds a vacation message.

  • return: The complete vacation message including all headers.
string _buildMessage (string $message, string $subject, string $from)
  • string $message: The text of the vacation notice.
  • string $subject: The subject of the vacation notice.
  • string $from: The From: address of the vacation notice.
_encryptPassword (line 387)

Formats a password using the current encryption.

  • return: The crypted password.
string _encryptPassword (string $plaintext, [string $salt = ''])
  • string $plaintext: The plaintext password to encrypt.
  • string $salt: The salt (or seed) to use.
_getUserDetails (line 361)

Retrieves the current vacation details for the user.

  • return: Vacation details or PEAR_Error on failure.
  • abstract:
array _getUserDetails (string $password)
  • string $password: The password for user.

Redefined in descendants as:
_makeEmailAddress (line 409)

Parses an email address list and returns it in a known standard form.

This will attempt to add the domain (realm) to unqualified addresses if the realm is non-blank and not 'default'.

  • return: The email address(es) on success, false on error.
string _makeEmailAddress (string $user, string $realm)
  • string $user: The email address.
  • string $realm: The domain/realm to add if none is present.
_parseMessage (line 303)

Parses a vacation message.

  • return: A hash with parsed results in the field 'message', 'subject' and 'from'.
array _parseMessage (string $message)
  • string $message: A vacation message.
_processMessage (line 276)

Processes the current vacation message.

void _processMessage (string $password)
  • string $password: The password for user.

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