Commit 2d5431e2 by Seldaek

* Added some details to the ZF Adapter README, thanks Stephan Wentz

git-svn-id: svn://dwoo.org/dwoo/trunk@147 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent 959b4e63
......@@ -9,11 +9,24 @@
// If anyone writes a more advanced how-to please let me know
// ------------------------
$viewInterface = new Dwoo_Adapters_ZendFramework_View(array(
$view = new Dwoo_Adapters_ZendFramework_View(array(
'compile_dir' => 'path/to/compile_dir' // set to null or remove this line to use defaults
'cache_dir' => 'path/to/cache_dir' // set to null or remove this line to use defaults
));
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($viewInterface);
// This allows you to use ZF's helpers as if they were Dwoo plugins (i.e. {doctype} will call the doctype helper)
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
\ No newline at end of file
$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');
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment