but yes, miles is right - in this case you could simply put in your
bootstrap.php

On 10 Feb., 11:24, euromark <[email protected]> wrote:
> usually there are "bound" to a specific model (as an enum 
> etc):http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-at...
>
> On 10 Feb., 02:13, "Krissy Masters" <[email protected]>
> wrote:
>
>
>
>
>
>
>
> > Quick question.
>
> > I have 3 types / classifications of "NEW"
>
> > Brand new = less than 24 hours
> > New more than 24 but less than 48 hours
> > And recently new more than 48 but less than 96 hours
>
> > Now how can I define these globally so if I have in the code anywhere > NEW
> > or < RECENT rather than tracing back all the spots where -24 hours so I can
> > simply change the NEW, BRAND_NEW and RECENTLY_NEW if I want to increase or
> > decrease their values later on
>
> > So I can use something like this in the code:
> > if ( $created < BRAND_NEW ){
> > //fun stuff here
>
> > }
>
> > So I can change them in 1 spot and reflect on the site throughout.
>
> > Configure::write('BRAND_NEW', date( 'Y-m-d H:i:s', strtotime( "-24 hours" )
> > ) );
>
> > Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to