phpdoc
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 14 Oct 2010 17:52:03 +0000 (11:52 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 15 Oct 2010 16:37:59 +0000 (10:37 -0600)
framework/Prefs/lib/Horde/Prefs.php

index e322621..27f600b 100644 (file)
@@ -11,6 +11,7 @@
  *
  * @author   Jon Parise <jon@horde.org>
  * @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:
+     * <pre>
+     * 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
+     * </pre>
      * @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