[Top] [All Lists]

Re: How to define a global constant which is available through whole app

Subject: Re: How to define a global constant which is available through whole app?
From: Miles J
Date: Tue, 15 Feb 2011 16:52:28 -0800 PST
Like AD7 said, you cant use functions on class properties. Do it in
the constructor.

On Feb 15, 3:36 pm, Alejandro Gómez Fernández <agom...@xxxxxxxxx>
> Hash: SHA1
> Another way to do this is using session variables, in this case, a
> constant. You can always access this var in every module.
> Alejandro.
> El 15/02/2011 10:52, sanjibdhar...@xxxxxxxxx escribi :
> > I tried Configure::write('company', 'xxx);  in bootstrap.php and to
> > access the constant I wrote
> > var $company = Configure::read('company'); in AppController but it
> > gives syntax error.Can somebody tell me how to access the constant or
> > there is another way of to define a global constant through whole app.
> Version: GnuPG v1.4.11 (MingW32)
> Comment: Using GnuPG with Mozilla -
> 0dwi9JE7otI/UBpPcEYzax6OfQBGn4MtT4vGv6DOoz6gzQtufg8ZGHPw5Gq0wLzx
> ICqszm8+PbQCZd3+ht/V5yjuLWYNXJ+zCCGSaBCtZxk0LfEKJ41+enxxxNBf+jL+
> 2Wr7x4kWf1wN0I1UaHicKKYhMLrID/mj/SIeMQK0WiQO2E2eCyq9XtU2iUQwUWEY
> OhLRz+GnUvQMn1vXtT3H8fkAkyj36Stx6+Pox7G2/gchM2slljC3UgDVNyeKPQu6
> RQ5ANsW4WLTA2Ey4Qz8+beoQW/2E7dJl8r/DBuDp8k4/QqntR634tRTP0VVPSbM=
> =XhXQ

Our newest site for the community: CakePHP Video Tutorials 
Check out the new CakePHP Questions site and help others 
with their CakePHP related questions.

To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at

<Prev in Thread] Current Thread [Next in Thread>