mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 11:13:27 +02:00
First public release of MyAAC
This commit is contained in:
32
system/libs/dwoo/Dwoo/Adapters/ZendFramework/README
Normal file
32
system/libs/dwoo/Dwoo/Adapters/ZendFramework/README
Normal file
@@ -0,0 +1,32 @@
|
||||
// ------------------------
|
||||
// Usage example :
|
||||
// ------------------------
|
||||
// Note that you might need to manually include 'lib/Dwoo.php',
|
||||
// 'lib/Dwoo/Adapters/ZendFramework/View.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)
|
||||
|
||||
$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');
|
Reference in New Issue
Block a user