_values), array_keys($properties)); // Don't unset, but rather set to null so we send up '' for deletion. foreach ($removed as $k) { $this->$k = null; } foreach ($properties as $k => $v) { $this->$k = $v; } } /** * Counts the number of elements in the AttachedObject instance. * * @return int the number of elements */ public function count() { return count($this->_values); } }