Re: How to overload app controller functions in child controller
Well whats the problem of putting it in beforeFilter()? Thats where
its supposed to go.
Your able to use beforeFilter() in child classes, as long as you call
the parent.
function beforeFilter() {
parent::beforeFilter();
}
On Dec 16, 7:30 am, engine <radicalet...@gmail.com> wrote:
> i have one app_controller in app/ directory which has BeforeFilter() function
> now i also have another example_controller controller in my controller
> directory which is inheriting the app_controller class (of course)class now
> my goal is to have one method in there which executes in the very beginning
> and set its private variables to some value. prior to cakephp i was using
> class constructor method to achieve this but cakephp do not allow me to use
> __construct() because it is already defined in core controller class. i also
> tried using beforeFilter() but this is again defined in parent class (custom
> app_controller) and giving me error, how can i have a constructor like
> function inside my controller does it has somthing to do with function
> overloading
>
> -----http://www.libmaker.com/sell books online | http://www.milestree.com/
> Web/tech news | http://www.hiclicks.com/seo and usability service
> --
> View this message in context:http://old.nabble.com/How-to-overload-app-controller-functions-in-chi...
> Sent from the CakePHP mailing list archive at Nabble.com.
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home