Add a function to simply remove an attribute when collapsing values.
authorGunnar Wrobel <p@rdus.de>
Tue, 14 Apr 2009 20:21:14 +0000 (22:21 +0200)
committerGunnar Wrobel <p@rdus.de>
Tue, 14 Apr 2009 20:21:14 +0000 (22:21 +0200)
framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php

index 2648109..f9939a7 100644 (file)
@@ -583,6 +583,24 @@ class Horde_Kolab_Server_Object
     }
 
     /**
+     * Simply remove an attribute so that it does not get transported
+     * to the server (it might have been needed before e.g. ID
+     * generation).
+     *
+     * @param string $key        The attribute to collapse into.
+     * @param array  $attributes The attributes to collapse.
+     * @param array  $info       The information currently working on.
+     *
+     * @return NULL.
+     */
+    protected function removeAttribute($key, $attributes, &$info)
+    {
+        foreach ($attributes as $attribute) {
+            unset($info[$attribute]);
+        }
+    }
+
+    /**
      * Get an empty value
      *
      * @return string An empty string.
@@ -597,8 +615,6 @@ class Horde_Kolab_Server_Object
      *
      * @param array $info The data of the object.
      *
-     * @static
-     *
      * @return string The ID.
      */
     public function generateId($info)