[SOLVED] Extending from one of my Controllers

Hello again,

Now I have this problem,

I have a table called Entry which stores some data about  Daily entries of a Accounting System.

So I have a controller called EntryController.

Now I want to extend this controller in two ways:

A controller called IncomingController and another called OutcomingController.

So I have something like that in my controllers directory:





To show my problem I'll take as example the IncomingController.php


class IncomingController extends EntryController


   // Do the stuff


but when y call some method of IncomingController I get that error:

YiiBase::include(EntryController.php) [<a href='yiibase.include'>yiibase.include</a>]: failed to open stream: No such file or directory

May be the problem is very simple to solve, but I don't know how…

Can anybody put me in the correct way?

Any controllers you want your controller to extend from should go in the components directory, it can go in any sub dir of protected as long as you set up your config to include the files.

Don’t forget to make sure the controller your extending also extends from the CController class :)

Thaks for your answer, solved adding that line to my config/main.php