1

I'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_"
Charles
  • 50,943
  • 13
  • 104
  • 142
  • I too have hit this roadblock. Looks like I have to go with plugins and helpers as explained here http://devzone.zend.com/1218/action-helpers-in-zend-framework/ – Srisa Aug 31 '12 at 14:12

0 Answers0