1
我的文件看起來像這樣全球幫手:爲Zend的模塊結構
/Zend
/Application
/Configs
/Modules
/home
/controllers
/views
/login
/controllerS
/forms
/library
/login
/models
/plugins
/views
我想創造出可以由所有模塊使用的幫手。有點「全球幫手」。有沒有一個標準的方法來完成這個?
'\t \t $視圖=新的Zend_View(); \t \t $ mypath = $ this-> view-> getHelperPaths(); \t \t $ view-> addHelperPath($ mypath ['Login_View_Helper_'],'RenderIfExists'); $ this-> renderIfExists('login.phtml'); ' – Proto
'\t \t $ view = new Zend_View(); \t \t $ mypath = $ this-> view-> getHelperPaths(); \t \t $ view-> addHelperPath($ mypath ['Login_View_Helper _'] [0],'RenderIfExists'); $ this-> renderIfExists('login.phtml'); '這給了我錯誤:'消息:方法「renderIfExists」不存在,並且沒有被封存在__call()中。我的助手是正確的。我用echo $ mypath ['Login_View_Helper _'] [0]'來檢查它 – Proto