diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Tool/Project/Context/Content/Engine.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Tool/Project/Context/Content/Engine.php Fri Mar 11 15:05:35 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