From: Gunnar Wrobel
Date: Thu, 4 Jun 2009 14:52:52 +0000 (+0200) Subject: Allow to request the object hash with multiple values rather than single values. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b9159d59b7096e852b0932f656962b6952aaf1de;p=horde.git Allow to request the object hash with multiple values rather than single values. --- diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php index e42b199e4..6527eeb81 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php @@ -454,11 +454,12 @@ class Horde_Kolab_Server_Object /** * Convert the object attributes to a hash. * - * @param string $attrs The attributes to return. + * @param string $attrs The attributes to return. + * @param boolean $single Should only a single attribute be returned? * * @return array|PEAR_Error The hash representing this object. */ - public function toHash($attrs = null) + public function toHash($attrs = null, $single = true) { $result = array(); @@ -471,7 +472,7 @@ class Horde_Kolab_Server_Object } foreach ($attrs as $key) { - $value = $this->get($key); + $value = $this->get($key, $single); $result[$key] = $value; }