diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Dojo/View/Helper/DijitContainer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Dojo/View/Helper/DijitContainer.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,92 @@ +_captureLock)) { + require_once 'Zend/Dojo/View/Exception.php'; + throw new Zend_Dojo_View_Exception(sprintf('Lock already exists for id "%s"', $id)); + } + + $this->_captureLock[$id] = true; + $this->_captureInfo[$id] = array( + 'params' => $params, + 'attribs' => $attribs, + ); + + ob_start(); + return; + } + + /** + * Finish capturing content for layout container + * + * @param string $id + * @return string + */ + public function captureEnd($id) + { + if (!array_key_exists($id, $this->_captureLock)) { + require_once 'Zend/Dojo/View/Exception.php'; + throw new Zend_Dojo_View_Exception(sprintf('No capture lock exists for id "%s"; nothing to capture', $id)); + } + + $content = ob_get_clean(); + extract($this->_captureInfo[$id]); + unset($this->_captureLock[$id], $this->_captureInfo[$id]); + return $this->_createLayoutContainer($id, $content, $params, $attribs); + } +}