Re: Call static function in bootstrap.php

2009-01-06 Thread oliver.pra...@googlemail.com
Might also be of interest to create a component that will handle this for you, which you just need to add to your app_controller ... On Jan 6, 11:52 am, cyberscorp wrote: > Thank you so much. I'll test these proposals and report back. > > On Jan 6, 9:16 am, gearvOsh wrote: > > > It will work fi

Re: Call static function in bootstrap.php

2009-01-06 Thread cyberscorp
Thank you so much. I'll test these proposals and report back. On Jan 6, 9:16 am, gearvOsh wrote: > It will work fine in your AppController beforeFilter(). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" gr

Re: Call static function in bootstrap.php

2009-01-06 Thread gearvOsh
It will work fine in your AppController beforeFilter(). --~--~-~--~~~---~--~~ 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, s

Re: Call static function in bootstrap.php

2009-01-05 Thread Jon Bennett
Hi cyberscorp, > Well, you cannot call a non-static method in a static way. I think this should probably be handled by your app_controller rather than in bootstrap, in beforeFilter at a guess. You then need to make your 2 methods model methods not controller methods, and call them like so: //

Re: Call static function in bootstrap.php

2009-01-05 Thread Daniel Hofstetter
Hi, > Sorry, it doesn't work. > > Any idea ? Thank you and sorry to bother you [code snipped] Well, you cannot call a non-static method in a static way. -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ You received this message because you ar

Re: Call static function in bootstrap.php

2009-01-05 Thread cyberscorp
Sorry, it doesn't work. Any idea ? Thank you and sorry to bother you *** bootstrap.php // Encodage // Configure::write('App.encoding', 'utf-8'); // Langues // --- // get actiavted languages $languages = LanguagesController::getActivat

Re: Call static function in bootstrap.php

2009-01-05 Thread Daniel Hofstetter
Hi, > if i use : > > App::import('Controller', 'Languages'); > > i got the following error: > > Fatal error: Class 'Controller' not found in /var/www/project/app/ > app_controller.php on line 2 It seems like you also have to import the Controller class with App::import('Core', 'Controller'); --

Re: Call static function in bootstrap.php

2009-01-05 Thread cyberscorp
if i use : App::import('Controller', 'Languages'); i got the following error: Fatal error: Class 'Controller' not found in /var/www/project/app/ app_controller.php on line 2 Thanks Daniel Hofstetter a écrit : > Hi, > > > I'm using a language controller to manage languages (activating and > >

Re: Call static function in bootstrap.php

2009-01-05 Thread Daniel Hofstetter
Hi, > I'm using a language controller to manage languages (activating and > set to default functions etc...) > How can i call a static function in bootstrap to load activated > languages? > > ex: > > // get activated languages > $languages = LanguagesController::getActivatedLanguages(); App::imp

Call static function in bootstrap.php

2009-01-05 Thread cyberscorp
Hi I'm using a language controller to manage languages (activating and set to default functions etc...) How can i call a static function in bootstrap to load activated languages? ex: // get activated languages $languages = LanguagesController::getActivatedLanguages(); Thank you & Happy new y