Hello everyone...

I'm little confused with defining constants in Cake.

I have a gallery of pictures that are on voting for _NUMBER_OF_HOURS
constant. In my old application that was written in pure PHP and not
Cake I had constants.php file where, all constants were defined like
this:
define('name', value);

I tried this in my bootstrap.php and it works and I could go with this
but in manual I see some methods like Configure::write and ::read to
do this?!?!

As I understood old method define(); is much better because it uses
php native way to define constants and latter on to use that constant
you just call it like this: _CONSTANT_NAME.

With configure method writing and reading takes some some time and
then again it is pain in the a** to do Configure::read() every time I
need value of _CONSTANT_NAME.

My question is the benefit of using Cake approach??? I can see some
dynamic aspects but everything can be achieved with define();

Am I wrong ??

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to