From 293a1e34ff46a197d107ba75057d2101a2b3b84d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 14 Oct 2010 11:52:03 -0600 Subject: [PATCH] phpdoc --- framework/Prefs/lib/Horde/Prefs.php | 45 ++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/framework/Prefs/lib/Horde/Prefs.php b/framework/Prefs/lib/Horde/Prefs.php index e322621a9..27f600b83 100644 --- a/framework/Prefs/lib/Horde/Prefs.php +++ b/framework/Prefs/lib/Horde/Prefs.php @@ -11,6 +11,7 @@ * * @author Jon Parise * @category Horde + * @license http://www.fsf.org/copyleft/lgpl.html LGPL * @package Prefs */ class Horde_Prefs implements ArrayAccess @@ -110,21 +111,27 @@ class Horde_Prefs implements ArrayAccess * * @param mixed $driver The type of concrete subclass to return. * @param string $scope The scope for this set of preferences. - * @param array $opts Additional options: - * - 'cache': (boolean) Should caching be used? - * DEFAULT: false - * - 'charset': (string) Default charset. [REQUIRED] - * - 'logger': (Horde_Log_Logger) Logging object. - * DEFAULT: NONE - * - 'password': (string) The password associated - * with 'user'. DEFAULT: NONE - * - 'sizecallback': (callback) If set, called when - * setting a value in the backend. - * DEFAULT: NONE - * - 'user': (string) The name of the user who owns - * this set of preferences. DEFAULT: NONE - * - 'translation': (object) A translation handler - * implementing Horde_Translation. + * @param array $opts Additional confguration options: + *
+     * REQUIRED:
+     * ---------
+     * charset - (string) Default charset.
+     * OPTIONAL:
+     * ---------
+     * cache - (boolean) Should caching be used?
+     *         DEFAULT: false
+     * logger - (Horde_Log_Logger) Logging object.
+     *          DEFAULT: NONE
+     * password - (string) The password associated with 'user'.
+     *            DEFAULT: NONE
+     * sizecallback - (callback) If set, called when setting a value in the
+     *                backend.
+     *                DEFAULT: NONE
+     * translation - (object) A translation handler implementing
+     *               Horde_Translation.
+     * user - (string) The name of the user who owns this set of preferences.
+     *        DEFAULT: NONE
+     * 
* @param array $params A hash containing any additional configuration * or connection parameters a subclass might need. * @@ -169,11 +176,9 @@ class Horde_Prefs implements ArrayAccess $this->_params = $params; $this->_scope = $scope; - if (isset($this->_opts['translation'])) { - $this->_dict = $this->_opts['translation']; - } else { - $this->_dict = new Horde_Translation_Gettext('Horde_Prefs', dirname(__FILE__) . '/../../locale'); - } + $this->_dict = isset($this->_opts['translation']) + ? $this->_opts['translation'] + : new Horde_Translation_Gettext('Horde_Prefs', dirname(__FILE__) . '/../../locale'); // Create a unique key that's safe to use for caching even if we want // another user's preferences later, then register the cache array in -- 2.11.0