Sunday, March 1, 2009

I cannot inherit methods from AppController.

When I try to create a beforeFilter() method in AppController so that
I can set up my Auth configuation for my entire app in one place my
actual controllers ignore AppController::beforeFilter(). If I modify
Controller::beforeFilter() I the controller will use it and seems to
skip AppController::beforeFilter(). So, obviously I am not putting my
custom method in the right place right? Well, the strange thinf about
it is that I can add and modify fields in my AppController and they
are inherited so my controller definetly seems to be inheriting
AppController. Also, if I try to add new methods, I get "call to
undefined method" errors. This goes against everything I know about
OOP. Is there something I am missing in CakePHP that changes normal
inheritance?

--~--~---------~--~----~------------~-------~--~----~
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: