Re: AppController methods
Well that really depends on what you want to do here. Try to think of your app_controller as a break dancer might think of his piece of cardboard or a street artist of his sidewalk. It is your canvas. It's pretty much what you want your other controllers to depend on. Maybe tell us what you want to do in particular? Cheers --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods
On Fri, Feb 20, 2009 at 11:14 AM, Martin Westin wrote: > > No need for all that :) Maybe, but it was a great reply :-) kaushik: since AppController extends Controller, you're probably looking for what methods you can use from that file. Check http://api.cakephp.org. The file you're interested in is cake/libs/controller/controller.php. - Gonzalo --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods
No need for all that :) AppController has no methods defined. That is sort of the point of the application controller... that is is defined in the application. The one in the core is just an empty placeholder. On Feb 20, 1:07 pm, luke BAKING barker wrote: > I'd be 'Api to. > > On Feb 20, 11:47 am, kaushik wrote: > > > Can anyone provide me list of AppController methods with their > > definations? --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods
I'd be 'Api to. On Feb 20, 11:47 am, kaushik wrote: > Can anyone provide me list of AppController methods with their > definations? --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
I think it's quite possible that these things happen because people forget to clear their app cache, not because cake has a bug. It seems highly unlikely that this sort of thing will happen only to the few and after update. On Jun 19, 12:33 pm, Aidan Lister <[EMAIL PROTECTED]> wrote: > So renaming / deleting this file should be documented > athttp://book.cakephp.org/edit/18/application-extensions? > > I hope the cakephp developers understand the security implications of > this change ... The majority of authentication models used in CakePHP > relied on AppController's beforeFilter ... with this file being > ignored, this unannounced change renders all security on these > applications completely inert, potentially exposing vast amounts of > data. > > On May 30, 12:30 pm, kewlburn <[EMAIL PROTECTED]> wrote: > > > I solved this one by renaming /cake/libs/controller/app_controller.php > > to /cake/libs/controller/app_controller.php1 > > :( > > > On Apr 12, 2:51 pm, Bodog <[EMAIL PROTECTED]> wrote: > > > > Install / Setup / Config were fine. I'm convinced there was a problem > > > with that build, since I had changed nothing when I switched to the > > > nightly. My config stayed the same and as soon as I switched to the > > > nightly libs, everything worked again.> I've been using 1.2.0.6311 as > > > well as another instance of the latest > > > > svn, both with no problems using app_controller in the app folder. If > > > > you're having problems, I'd look at your install/setup/config before > > > > anything else > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
On Jun 19, 12:33 pm, Aidan Lister <[EMAIL PROTECTED]> wrote: > So renaming / deleting this file should be documented > athttp://book.cakephp.org/edit/18/application-extensions? don't touch the cake folder and no. > > I hope the cakephp developers understand the security implications of > this change ... Which change are you referring to? This thread is at the absolute most about a transient bug. Cheers, AD --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
So renaming / deleting this file should be documented at http://book.cakephp.org/edit/18/application-extensions ? I hope the cakephp developers understand the security implications of this change ... The majority of authentication models used in CakePHP relied on AppController's beforeFilter ... with this file being ignored, this unannounced change renders all security on these applications completely inert, potentially exposing vast amounts of data. On May 30, 12:30 pm, kewlburn <[EMAIL PROTECTED]> wrote: > I solved this one by renaming /cake/libs/controller/app_controller.php > to /cake/libs/controller/app_controller.php1 > :( > > On Apr 12, 2:51 pm, Bodog <[EMAIL PROTECTED]> wrote: > > > Install / Setup / Config were fine. I'm convinced there was a problem > > with that build, since I had changed nothing when I switched to the > > nightly. My config stayed the same and as soon as I switched to the > > nightly libs, everything worked again.> I've been using 1.2.0.6311 as well > > as another instance of the latest > > > svn, both with no problems using app_controller in the app folder. If > > > you're having problems, I'd look at your install/setup/config before > > > anything else --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
I solved this one by renaming /cake/libs/controller/app_controller.php to /cake/libs/controller/app_controller.php1 :( On Apr 12, 2:51 pm, Bodog <[EMAIL PROTECTED]> wrote: > Install / Setup / Config were fine. I'm convinced there was a problem > with that build, since I had changed nothing when I switched to the > nightly. My config stayed the same and as soon as I switched to the > nightly libs, everything worked again.> I've been using 1.2.0.6311 as well as > another instance of the latest > > svn, both with no problems using app_controller in the app folder. If > > you're having problems, I'd look at your install/setup/config before > > anything else --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
Install / Setup / Config were fine. I'm convinced there was a problem with that build, since I had changed nothing when I switched to the nightly. My config stayed the same and as soon as I switched to the nightly libs, everything worked again. > I've been using 1.2.0.6311 as well as another instance of the latest > svn, both with no problems using app_controller in the app folder. If > you're having problems, I'd look at your install/setup/config before > anything else --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
well, nate is on the dev team, so it's possible he knows what he's talking about :P I've been using 1.2.0.6311 as well as another instance of the latest svn, both with no problems using app_controller in the app folder. If you're having problems, I'd look at your install/setup/config before anything else --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
Yep, it seems like the 1.2 build which is downloaded from cakephp.org has this problem. Getting the latest nightly seems to solve it when read from: app/app_controller.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
A few mixed messages here. Some people say to put app_controller.php in: app/app_controller.php while others say: app/controllers/app_controller.php Neither work for me in 1.2.0.6311 beta. Just like Seb, I had to put it in: cake/libs/controllers/app_controller.php ... which isn't supposed to be the expected format. There should be a way to override the controller on a per-app basis. Is this a problem with the build, or is there something else we don't know? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
Mike, that's because AppController is supposed to go in your app/ folder, not in controllers/, not in the root. On Feb 13, 4:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > can i jump in here? > i have app_controller.php in controllers/ and its first line is > die("woot") > > it does not die. i made a copy and put in the app root, and it did > not die either. > > 1.2.0.6311 beta > > On Jan 30, 4:39 am, Seb <[EMAIL PROTECTED]> wrote: > > > OK, now I'm confused. > > > I've just got the latest nightly, put app_controller.php in /app/ > > app_controller.php and it seems to be working - looks like there's > > something broke in the new year's build?! > > > Thanks for the help anyway - i'll "pseudo" protect my functions from > > now on :D > > > Seb > > > On Jan 30, 10:30 am, grigri <[EMAIL PROTECTED]> wrote: > > > > Since a certain revision of 1.2 (not sure which one), your app > > > controller must be in > > > > /app/controllers/app_controller.php > > > > NOT > > > > /app/app_controller.php like before > > > > Also note that in a controller, any 'public' method is potentially an > > > action, so you should really pseudo-protect `doSomething` : > > > > class AppController extends Controller { > > > function _doSomething() { > > > // ... > > > } > > > > } > > > > On Jan 30, 10:17 am, Seb <[EMAIL PROTECTED]> wrote: > > > > > I've looked into this a bit more and found that if i stick my custom > > > > functions for AppController in: > > > > > /cake/libs/controller/app_controller.php > > > > > Then the function is visible in the sub controllers - is Cake 1.2 just > > > > ignoring my /app/app_controller.php completely?! (also i tried putting > > > > it in /app/controllers/app_controller.php and that didn't work > > > > either...) > > > > > Thanks! > > > > > Seb > > > > > On Jan 30, 10:07 am, Seb <[EMAIL PROTECTED]> wrote: > > > > > > Hi! > > > > > > I'm just thinking about moving an App i'm working on to CakePHP 1.2 so > > > > > that I can enjoy some of the new features... I seem to have fallen at > > > > > the first hurdle though! > > > > > > In my existing app (for 1.1) I define some functions in my /app/ > > > > > app_controller.php for use elsewhere. E.g.: > > > > > > class AppController extends Controller { > > > > > function isAdmin() { > > > > > return isset($this->params['admin']); > > > > > } > > > > > > } > > > > > > Then from my other controllers (which extend AppController), I can > > > > > have things which call it: > > > > > > class SomeController extends AppController { > > > > > function doSomething() { > > > > > if ($this->isAdmin()) { > > > > > // blah > > > > > } > > > > > > } > > > > > > This works fine in 1.1, but causes a "Call to undefined method > > > > > SomeController::isAdmin()" in CakePHP 1.2 > > > > > > I can't really think of a better way to do things like that without > > > > > duplicating lots of code (which I do my best to avoid at all times) so > > > > > would like a way to make the Controllers inherit function properly > > > > > from their parent objects... > > > > > > Please help! > > > > > > Thanks > > > > > > Seb --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
put die in __construct(){ die('wtf'); } On 13 velj, 21:43, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > can i jump in here? > i have app_controller.php in controllers/ and its first line is > die("woot") > > it does not die. i made a copy and put in the app root, and it did > not die either. > > 1.2.0.6311 beta > > On Jan 30, 4:39 am, Seb <[EMAIL PROTECTED]> wrote: > > > OK, now I'm confused. > > > I've just got the latest nightly, put app_controller.php in /app/ > > app_controller.php and it seems to be working - looks like there's > > something broke in the new year's build?! > > > Thanks for the help anyway - i'll "pseudo" protect my functions from > > now on :D > > > Seb > > > On Jan 30, 10:30 am, grigri <[EMAIL PROTECTED]> wrote: > > > > Since a certain revision of 1.2 (not sure which one), your app > > > controller must be in > > > > /app/controllers/app_controller.php > > > > NOT > > > > /app/app_controller.php like before > > > > Also note that in a controller, any 'public' method is potentially an > > > action, so you should really pseudo-protect `doSomething` : > > > > class AppController extends Controller { > > > function _doSomething() { > > > // ... > > > } > > > > } > > > > On Jan 30, 10:17 am, Seb <[EMAIL PROTECTED]> wrote: > > > > > I've looked into this a bit more and found that if i stick my custom > > > > functions for AppController in: > > > > > /cake/libs/controller/app_controller.php > > > > > Then the function is visible in the sub controllers - is Cake 1.2 just > > > > ignoring my /app/app_controller.php completely?! (also i tried putting > > > > it in /app/controllers/app_controller.php and that didn't work > > > > either...) > > > > > Thanks! > > > > > Seb > > > > > On Jan 30, 10:07 am, Seb <[EMAIL PROTECTED]> wrote: > > > > > > Hi! > > > > > > I'm just thinking about moving an App i'm working on to CakePHP 1.2 so > > > > > that I can enjoy some of the new features... I seem to have fallen at > > > > > the first hurdle though! > > > > > > In my existing app (for 1.1) I define some functions in my /app/ > > > > > app_controller.php for use elsewhere. E.g.: > > > > > > class AppController extends Controller { > > > > > function isAdmin() { > > > > > return isset($this->params['admin']); > > > > > } > > > > > > } > > > > > > Then from my other controllers (which extend AppController), I can > > > > > have things which call it: > > > > > > class SomeController extends AppController { > > > > > function doSomething() { > > > > > if ($this->isAdmin()) { > > > > > // blah > > > > > } > > > > > > } > > > > > > This works fine in 1.1, but causes a "Call to undefined method > > > > > SomeController::isAdmin()" in CakePHP 1.2 > > > > > > I can't really think of a better way to do things like that without > > > > > duplicating lots of code (which I do my best to avoid at all times) so > > > > > would like a way to make the Controllers inherit function properly > > > > > from their parent objects... > > > > > > Please help! > > > > > > Thanks > > > > > > Seb --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
can i jump in here? i have app_controller.php in controllers/ and its first line is die("woot") it does not die. i made a copy and put in the app root, and it did not die either. 1.2.0.6311 beta On Jan 30, 4:39 am, Seb <[EMAIL PROTECTED]> wrote: > OK, now I'm confused. > > I've just got the latest nightly, put app_controller.php in /app/ > app_controller.php and it seems to be working - looks like there's > something broke in the new year's build?! > > Thanks for the help anyway - i'll "pseudo" protect my functions from > now on :D > > Seb > > On Jan 30, 10:30 am, grigri <[EMAIL PROTECTED]> wrote: > > > Since a certain revision of 1.2 (not sure which one), your app > > controller must be in > > > /app/controllers/app_controller.php > > > NOT > > > /app/app_controller.php like before > > > Also note that in a controller, any 'public' method is potentially an > > action, so you should really pseudo-protect `doSomething` : > > > class AppController extends Controller { > > function _doSomething() { > > // ... > > } > > > } > > > On Jan 30, 10:17 am, Seb <[EMAIL PROTECTED]> wrote: > > > > I've looked into this a bit more and found that if i stick my custom > > > functions for AppController in: > > > > /cake/libs/controller/app_controller.php > > > > Then the function is visible in the sub controllers - is Cake 1.2 just > > > ignoring my /app/app_controller.php completely?! (also i tried putting > > > it in /app/controllers/app_controller.php and that didn't work > > > either...) > > > > Thanks! > > > > Seb > > > > On Jan 30, 10:07 am, Seb <[EMAIL PROTECTED]> wrote: > > > > > Hi! > > > > > I'm just thinking about moving an App i'm working on to CakePHP 1.2 so > > > > that I can enjoy some of the new features... I seem to have fallen at > > > > the first hurdle though! > > > > > In my existing app (for 1.1) I define some functions in my /app/ > > > > app_controller.php for use elsewhere. E.g.: > > > > > class AppController extends Controller { > > > > function isAdmin() { > > > > return isset($this->params['admin']); > > > > } > > > > > } > > > > > Then from my other controllers (which extend AppController), I can > > > > have things which call it: > > > > > class SomeController extends AppController { > > > > function doSomething() { > > > > if ($this->isAdmin()) { > > > > // blah > > > > } > > > > > } > > > > > This works fine in 1.1, but causes a "Call to undefined method > > > > SomeController::isAdmin()" in CakePHP 1.2 > > > > > I can't really think of a better way to do things like that without > > > > duplicating lots of code (which I do my best to avoid at all times) so > > > > would like a way to make the Controllers inherit function properly > > > > from their parent objects... > > > > > Please help! > > > > > Thanks > > > > > Seb --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
Since a certain revision of 1.2 (not sure which one), your app controller must be in /app/controllers/app_controller.php NOT /app/app_controller.php like before Also note that in a controller, any 'public' method is potentially an action, so you should really pseudo-protect `doSomething` : class AppController extends Controller { function _doSomething() { // ... } } On Jan 30, 10:17 am, Seb <[EMAIL PROTECTED]> wrote: > I've looked into this a bit more and found that if i stick my custom > functions for AppController in: > > /cake/libs/controller/app_controller.php > > Then the function is visible in the sub controllers - is Cake 1.2 just > ignoring my /app/app_controller.php completely?! (also i tried putting > it in /app/controllers/app_controller.php and that didn't work > either...) > > Thanks! > > Seb > > On Jan 30, 10:07 am, Seb <[EMAIL PROTECTED]> wrote: > > > Hi! > > > I'm just thinking about moving an App i'm working on to CakePHP 1.2 so > > that I can enjoy some of the new features... I seem to have fallen at > > the first hurdle though! > > > In my existing app (for 1.1) I define some functions in my /app/ > > app_controller.php for use elsewhere. E.g.: > > > class AppController extends Controller { > > function isAdmin() { > > return isset($this->params['admin']); > > } > > > } > > > Then from my other controllers (which extend AppController), I can > > have things which call it: > > > class SomeController extends AppController { > > function doSomething() { > > if ($this->isAdmin()) { > > // blah > > } > > > } > > > This works fine in 1.1, but causes a "Call to undefined method > > SomeController::isAdmin()" in CakePHP 1.2 > > > I can't really think of a better way to do things like that without > > duplicating lots of code (which I do my best to avoid at all times) so > > would like a way to make the Controllers inherit function properly > > from their parent objects... > > > Please help! > > > Thanks > > > Seb --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
OK, now I'm confused. I've just got the latest nightly, put app_controller.php in /app/ app_controller.php and it seems to be working - looks like there's something broke in the new year's build?! Thanks for the help anyway - i'll "pseudo" protect my functions from now on :D Seb On Jan 30, 10:30 am, grigri <[EMAIL PROTECTED]> wrote: > Since a certain revision of 1.2 (not sure which one), your app > controller must be in > > /app/controllers/app_controller.php > > NOT > > /app/app_controller.php like before > > Also note that in a controller, any 'public' method is potentially an > action, so you should really pseudo-protect `doSomething` : > > class AppController extends Controller { > function _doSomething() { > // ... > } > > } > > On Jan 30, 10:17 am, Seb <[EMAIL PROTECTED]> wrote: > > > I've looked into this a bit more and found that if i stick my custom > > functions for AppController in: > > > /cake/libs/controller/app_controller.php > > > Then the function is visible in the sub controllers - is Cake 1.2 just > > ignoring my /app/app_controller.php completely?! (also i tried putting > > it in /app/controllers/app_controller.php and that didn't work > > either...) > > > Thanks! > > > Seb > > > On Jan 30, 10:07 am, Seb <[EMAIL PROTECTED]> wrote: > > > > Hi! > > > > I'm just thinking about moving an App i'm working on to CakePHP 1.2 so > > > that I can enjoy some of the new features... I seem to have fallen at > > > the first hurdle though! > > > > In my existing app (for 1.1) I define some functions in my /app/ > > > app_controller.php for use elsewhere. E.g.: > > > > class AppController extends Controller { > > > function isAdmin() { > > > return isset($this->params['admin']); > > > } > > > > } > > > > Then from my other controllers (which extend AppController), I can > > > have things which call it: > > > > class SomeController extends AppController { > > > function doSomething() { > > > if ($this->isAdmin()) { > > > // blah > > > } > > > > } > > > > This works fine in 1.1, but causes a "Call to undefined method > > > SomeController::isAdmin()" in CakePHP 1.2 > > > > I can't really think of a better way to do things like that without > > > duplicating lots of code (which I do my best to avoid at all times) so > > > would like a way to make the Controllers inherit function properly > > > from their parent objects... > > > > Please help! > > > > Thanks > > > > Seb --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController methods in CakePHP 1.2
I've looked into this a bit more and found that if i stick my custom functions for AppController in: /cake/libs/controller/app_controller.php Then the function is visible in the sub controllers - is Cake 1.2 just ignoring my /app/app_controller.php completely?! (also i tried putting it in /app/controllers/app_controller.php and that didn't work either...) Thanks! Seb On Jan 30, 10:07 am, Seb <[EMAIL PROTECTED]> wrote: > Hi! > > I'm just thinking about moving an App i'm working on to CakePHP 1.2 so > that I can enjoy some of the new features... I seem to have fallen at > the first hurdle though! > > In my existing app (for 1.1) I define some functions in my /app/ > app_controller.php for use elsewhere. E.g.: > > class AppController extends Controller { > function isAdmin() { > return isset($this->params['admin']); > } > > } > > Then from my other controllers (which extend AppController), I can > have things which call it: > > class SomeController extends AppController { > function doSomething() { > if ($this->isAdmin()) { > // blah > } > > } > > This works fine in 1.1, but causes a "Call to undefined method > SomeController::isAdmin()" in CakePHP 1.2 > > I can't really think of a better way to do things like that without > duplicating lots of code (which I do my best to avoid at all times) so > would like a way to make the Controllers inherit function properly > from their parent objects... > > Please help! > > Thanks > > Seb --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---