我有一个 Zend Framework 的模块化设置,目前只有 2 个模块:
web
mobile
设置如下:
applications
--modules
----**web**
------controllers
--------IndexController.php
-----------function indexAction(){.......}
-----------function pageAction(){......}
------models
--------Model.php
------views
--------scripts
----------index.phtml
----**mobile**
------controllers
--------IndexController.php
------views
--------scripts
----------index.phtml
我想通过重用模块的和IndexController在模块中实现代码重用,并在模块中添加另一个方法,该方法仅对模块可用。有没有办法做到这一点,而无需将代码复制到模块中的模块中?mobileindexAction()pageAction()IndexControllerwebpaperAction()**mobile**mobileIndexController.phpwebmobile
谢谢