/** * Convert the data to a XML stream. * * @param array $object The data array representing the object. * @param array $options Additional options when writing the XML. This * decorator provides no additional options. * * @return resource The data as XML stream. * * @throws Horde_Kolab_Format_Exception */ public function save($object, $options = array()) { $this->_memory->push(); $result = $this->getHandler()->save($object); $this->_logger->debug(sprintf('Kolab Format data generation complete. Memory usage: %s', $this->_formatUsage($this->_memory->pop()))); return $result; }
public function testNotPushedThrowsException() { $t = new Horde_Support_Memory(); try { $t->pop(); $this->fail('Expected Exception'); } catch (Exception $e) { } }