ResetBehavior and HazardableBehavior

0

ResetBehavior Reset is a new behavior I recently had to write to update some geocoded entries as well as records with processed titles/slugs – via beforeSave() – that had to be re-saved with a corrected processing method. Basically, it is…

Localized number formats for forms

2

Often your language is not english and therefore the locale settings for decimals are not . for decimals and , for thousands, but the opposite, for example. If you do not allow localized input/output in your CakePHP apps it often…

Geocoding with CakePHP

28

Geocoding is a very powerful tool if you want to work with lat/lng, distances or just want to display a small map for your addresses. I use it in combination with my GoogleMaps Helper to display a dynamic or a…

Working with passwords in CakePHP

36

The basics Usually, this is already well known. But.. there are still developers who actually store the password unhashed. You always have to store user passwords hashed. You can either use the still very common sha1 method (which is the…

Working with models

0

Since there is so much to talk about it here, I will cut right to the chase. We all know about "Fat Models, Slim Controllers". So basically, as much as possible of the code should be in the model. For…

Behaviors in CakePHP

0

I didn’t use behaviors for the first 12 months with Cake. I regret it now, because the code is no much cleaner and easier to extend. Let’s make a test with a simple task. We need some additional statistics to…