开发者

PHP Zend Framework: How do I make ZF Tool work with extended Controller_Actions?

开发者 https://www.devze.com 2023-04-05 07:30 出处:网络
I开发者_StackOverflow\'m working with a Zend Framework project and using the ZF tool from the command line.After setting up some initial structure, I extended the Zend_Controller_Action class with som

I开发者_StackOverflow'm working with a Zend Framework project and using the ZF tool from the command line. After setting up some initial structure, I extended the Zend_Controller_Action class with something like MySite_Controller_Action and made the existing controllers point to that. So now I have something like:

class IndexController extends MySite_Controller_Action
{  ... }

and

abstract class MySite_Controller_Action extends Zend_Controller_Action
{ ... }

The problem is that now when I attempt to run a command like

Bash$ zf create action edit Index

I get an error like this:

Creating an action named edit inside controller at /Library/WebServer/Documents/MySite/application/controllers/IndexController.php
PHP Fatal error:  Class 'MySite_Controller_Action' not found in /Library/WebServer/Documents/MySite/application/controllers/IndexController.php on line 3

Fatal error: Class 'MySite_Controller_Action' not found in /Library/WebServer/Documents/OurMods/application/controllers/IndexController.php on line 3

Can anyone offer up any ideas? I've done a little searching, but I don't even know where to start on this one.

NOTE: I HAVE loaded a 'MySite' namespace via the application.ini file as follows:

autoloadernamespaces.MySite = "MySite_"
0

精彩评论

暂无评论...
验证码 换一张
取 消