unless he needs the uri in initialized() than this would be too late.
then one might have to overwrite constructClasses():
public function constructClasses() {
$this->components['TeamSpeak3.TeamSpeak3'] = array(
'uri' => Configure::read('Settings.ts_uri));
parent::constructClasses();
}
Just don't put it in $components then.
Am Mittwoch, 20. Februar 2013 01:10:21 UTC+1 schrieb cricket:
>
> On Tue, Feb 19, 2013 at 4:00 PM, Julien Itard
> <[email protected]<javascript:>>
> wrote:
> > Hi there,
> > here is my AppController :
> >
> > public $components = array(
> > 'TeamSpeak3.TeamSpeak3' => array(
> > 'uri' => Configure::read('Settings.ts_uri)
> > )
> > );
> >
> > I need to use a configure here but it doesn't work ... any idea ?
> >
> > Thx from France :)
>
> Salut,
>
> You can't do that when declaring a class variable because it depends
> on runtime info.
>
> public $components = array(
> 'TeamSpeak3.TeamSpeak3'
> );
>
> function beforeFilter() {
> $this->TeamSpeak3->uri = Configure::read(Settings.ts_uri);
> }
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.