From 3777930040169c834a40ec87cada049df4c93c07 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Tue, 14 Apr 2009 22:21:14 +0200 Subject: [PATCH] Add a function to simply remove an attribute when collapsing values. --- .../Kolab_Server/lib/Horde/Kolab/Server/Object.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php index 2648109b4..f9939a799 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php @@ -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) -- 2.11.0