* @category Horde
* @package Prefs
*/
-class Horde_Prefs
+class Horde_Prefs implements ArrayAccess
{
/** Preference is administratively locked. */
const LOCKED = 1;
}
}
+ /* ArrayAccess methods. */
+
+ public function offsetExists($offset)
+ {
+ return !is_null($this->getValue($offset));
+ }
+
+ public function offsetGet($offset)
+ {
+ return $this->getValue($offset);
+ }
+
+ public function offsetSet($offset, $value)
+ {
+ $this->setValue($offset, $value);
+ }
+
+ public function offsetUnset($offset)
+ {
+ $this->remove($offset);
+ }
+
}
<api>beta</api>
</stability>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* Remove dependency on horde/Core.
+ <notes>* Add array access API to Horde_Prefs.
+ * Remove dependency on horde/Core.
* Use Horde_Db as backend for Sql driver.
* Moved UI code to horde/Core.
* Initial Horde 4 package.