diff -r 000000000000 -r 4eba9c11703f web/Zend/Cache/Frontend/Capture.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Cache/Frontend/Capture.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,88 @@ +_tags = $tags; + $this->_extension = $extension; + ob_start(array($this, '_flush')); + ob_implicit_flush(false); + $this->_idStack[] = $id; + return false; + } + + /** + * callback for output buffering + * (shouldn't really be called manually) + * + * @param string $data Buffered output + * @return string Data to send to browser + */ + public function _flush($data) + { + $id = array_pop($this->_idStack); + if ($id === null) { + Zend_Cache::throwException('use of _flush() without a start()'); + } + if ($this->_extension) { + $this->save(serialize(array($data, $this->_extension)), $id, $this->_tags); + } else { + $this->save($data, $id, $this->_tags); + } + return $data; + } +}