From b1f13c2b907b37bb6bca7b49c7334e27d19ae84d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 2 Aug 2010 23:44:34 -0600 Subject: [PATCH] phpdoc --- framework/Auth/lib/Horde/Auth/Ldap.php | 19 +++++----- framework/Prefs/lib/Horde/Prefs/Ldap.php | 60 +++++++++++--------------------- 2 files changed, 30 insertions(+), 49 deletions(-) diff --git a/framework/Auth/lib/Horde/Auth/Ldap.php b/framework/Auth/lib/Horde/Auth/Ldap.php index 6c3cc4004..97c3946e9 100644 --- a/framework/Auth/lib/Horde/Auth/Ldap.php +++ b/framework/Auth/lib/Horde/Auth/Ldap.php @@ -43,16 +43,15 @@ class Horde_Auth_Ldap extends Horde_Auth_Base * Constructor. * * @param array $params Required parameters: - * - basedn (string): The base DN for the LDAP server. - * - ldap (Horde_Ldap): Horde LDAP object. - * - uid (string): The username search key. - * Optional parameters: - * - filter (string): The LDAP formatted search filter - * to search for users. This setting overrides the - * 'objectclass' method below. - * - objectclass (string|array): The objectclass - * filter used to search for users. Either a single - * or an array of objectclasses. + *
+     * 'basedn' - (string) [REQUIRED] The base DN for the LDAP server.
+     * 'filter' - (string) The LDAP formatted search filter to search for
+     *            users. This setting overrides the 'objectclass' parameter.
+     * 'ldap' - (Horde_Ldap) [REQUIRED] Horde LDAP object.
+     * 'objectclass - (string|array): The objectclass filter used to search
+     *                for users. Either a single or an array of objectclasses.
+     * 'uid' - (string) [REQUIRED] The username search key.
+     * 
* * @throws Horde_Auth_Exception * @throws InvalidArgumentException diff --git a/framework/Prefs/lib/Horde/Prefs/Ldap.php b/framework/Prefs/lib/Horde/Prefs/Ldap.php index 60ba943d4..74000e2a5 100644 --- a/framework/Prefs/lib/Horde/Prefs/Ldap.php +++ b/framework/Prefs/lib/Horde/Prefs/Ldap.php @@ -2,43 +2,6 @@ /** * Preferences storage implementation for PHP's LDAP extension. * - * Required parameters: - * - basedn: The base DN for the LDAP server. - * - hostspec: The hostname of the LDAP server. - * - uid: The username search key. - * - writeas: One of "user", "admin", or "search" - * - * Optional parameters: - * - binddn: The DN of the administrative account to bind for write - * operations. - * - bindpw: 'binddn's password for bind authentication. - * - port: The port of the LDAP server. DEFAULT: 389 - * - searchdn: The DN of a user with search permissions on the directory - * - searchpw: 'searchdn's password for binding - * - tls: Whether to use TLS connections. DEFAULT: false - * - version: The version of the LDAP protocol to use. - * DEFAULT: NONE (system default will be used) - * - * If setting up as the Horde preference handler in conf.php, the following - * is an example configuration. - * The schemas needed for ldap are in horde/scripts/ldap. - * - * - * $conf['prefs']['driver'] = 'ldap'; - * $conf['prefs']['params']['hostspec'] = 'localhost'; - * $conf['prefs']['params']['port'] = '389'; - * $conf['prefs']['params']['basedn'] = 'dc=example,dc=org'; - * $conf['prefs']['params']['uid'] = 'mail'; - * - * - * The following is valid but would only be necessary if users do NOT have - * permission to modify their own LDAP accounts. - * - * - * $conf['prefs']['params']['binddn'] = 'cn=Manager,dc=example,dc=org'; - * $conf['prefs']['params']['bindpw'] = 'password'; - * - * * Copyright 1999-2010 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you @@ -77,8 +40,27 @@ class Horde_Prefs_Ldap extends Horde_Prefs * * @param string $scope The scope for this set of preferences. * @param array $opts See factory() for list of options. - * @param array $params A hash containing any additional configuration - * or connection parameters a subclass might need. + * @param array $params Additional configuration options: + *
+     * basedn - (string) [REQUIRED] The base DN for the LDAP server.
+     * hostspec - (string) [REQUIRED] The hostname of the LDAP server.
+     * uid - (string) [REQUIRED] The username search key.
+     * writeas - (string) [REQUIRED] One of "user", "admin", or "search"
+     *
+     * Optional parameters:
+     * binddn - (string) The DN of the administrative account to bind for
+     *          write operations.
+     * bindpw - (string) binddn's password for bind authentication.
+     * port - (integer) The port of the LDAP server.
+     *        DEFAULT: 389
+     * searchdn - (string) The DN of a user with search permissions on the
+     *            directory.
+     * searchpw - (string) searchdn's password for binding.
+     * tls - (boolean) Whether to use TLS connections.
+     *       DEFAULT: false
+     * version - (integer) The version of the LDAP protocol to use.
+     *           DEFAULT: NONE (system default will be used)
+     * 
*/ protected function __construct($scope, $opts, $params); { -- 2.11.0