diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/Tool/Project/Context/Content/Engine/Phtml.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/Tool/Project/Context/Content/Engine/Phtml.php Thu Jan 20 19:30:54 2011 +0100 @@ -0,0 +1,89 @@ +_storage = $storage; + $this->_contentPrefix = $contentPrefix; + } + + /** + * hasContext() + * + * @param Zend_Tool_Project_Context_Interface $context + * @param string $method + * @return string + */ + public function hasContent(Zend_Tool_Project_Context_Interface $context, $method) + { + return $this->_storage->has($this->_contentPrefix . '/' . $context . '/' . $method . '.phtml'); + } + + /** + * getContent() + * + * @param Zend_Tool_Project_Context_Interface $context + * @param string $method + * @param mixed $parameters + */ + public function getContent(Zend_Tool_Project_Context_Interface $context, $method, $parameters) + { + $streamUri = $this->_storage->getStreamUri($this->_contentPrefix . '/' . $context->getName() . '/' . $method . '.phtml'); + + ob_start(); + include $streamUri; + $content = ob_get_clean(); + + return $content; + } + +} \ No newline at end of file