// ------------------------ // Usage example : // ------------------------ // Note that you might need to manually include 'lib/Dwoo.php', // 'lib/Dwoo/Adapters/ZendFramework/View.php', // 'lib/Dwoo/Adapters/ZendFramework/Dwoo.php', and // 'lib/Dwoo/Adapters/ZendFramework/PluginProxy.php' for this to // work as expected, depending on your ZF setup // // If anyone writes a more advanced how-to please let me know // ------------------------ $view = new Dwoo_Adapters_ZendFramework_View(array( 'compileDir' => 'path/to/compile_dir' // set to null or remove this line to use defaults 'cacheDir' => 'path/to/cache_dir' // set to null or remove this line to use defaults )); // This allows you to use ZF's helpers as if they were Dwoo plugins (i.e. {doctype} will call the doctype helper) // This also allows you to use $this->variable to access view variables from within templates $view->setPluginProxy(new Dwoo_Adapters_ZendFramework_PluginProxy(new Zend_View())); // 1. example - used with the Zend Controller $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view); Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); // 2. example - used manually $view->assign('foo', 'bar'); $view->display('foobar.phtml');