diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/Tool/Project/Context/Content/Engine.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/Tool/Project/Context/Content/Engine.php Thu Jan 20 19:30:54 2011 +0100 @@ -0,0 +1,106 @@ +_storage = $storage; + $this->_engines = array( + new Zend_Tool_Project_Context_Content_Engine_CodeGenerator($storage, $this->_keyInStorage), + new Zend_Tool_Project_Context_Content_Engine_Phtml($storage, $this->_keyInStorage), + ); + } + + /** + * getContent() + * + * @param Zend_Tool_Project_Context_Interface $context + * @param string $methodName + * @param mixed $parameters + * @return string + */ + public function getContent(Zend_Tool_Project_Context_Interface $context, $methodName, $parameters) + { + $content = null; + + foreach ($this->_engines as $engine) { + if ($engine->hasContent($context, $methodName, $parameters)) { + $content = $engine->getContent($context, $methodName, $parameters); + + if ($content != null) { + break; + } + + } + + } + + if ($content == null) { + return false; + } + + return $content; + } + +} \ No newline at end of file