Monday, November 30, 2009

Re: Apps_Controller and Apps_Model

Yes you can. For example:
Create "CoreAppController" base class with all common methods

Extend CoreAppController in app_controller.php:

require_once 'path_to_core_app_controller.php'; (use App::import()
instead)
AppController extends CoreAppController {

//for Controller callbacks
function beforeFilter (){
parent::beforeFilter();
}
}

Same for AppModel...

On Nov 30, 3:41 pm, Ernesto <e.fanz...@gmail.com> wrote:
> hello.
>
> i have a multi-app environment wich is working ok.
>
> some apps are very similar each other.
>
> is it possible to create a class like Apps_Controller (or Apps_Model)
> and share it across many apps?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: