Tags
Tag Archives: CakePHP
Working with Associations using CakePHP
I was asked by Niraja Mulye of Packt Publishing if I would be interested in publishing an article on my blog from the book, CakePHP Application Development. Since it seems relevant to any starting out with CakePHP, I guess why not.
Instead of copying and pasting what was sent, I found two articles which seemed like [...]
What a Start to 2009
5 days of downtime and finally back online. A faulty RAID card leading to all sorts of restoration problems. Totally unacceptable. I have to probably start looking out for a new web hosting provider but what a hassle.
For fellow Planet CakePHP subscribers, I apologise for having you missed 5 days of CakePHP news. [...]
Planet CakePHP With Multiple Feeds
Short of having an actual announcement feed for Planet CakePHP, this seems like the fastest way to get information to all you subscribers.
If you were wondering about the few non-English items showing up in the feed, you actually have a choice to subscribe to a separate feed which aggregates websites written in English/Portuguese/Spanish. [...]
CakePHP Losing or Missing Session?
I have my fair share of problems with session in Cake so I thought I can share the two important configurations in app/config/core.php which affects how Cake handles the session.
Session.checkAgent
Setting this to TRUE means Cake will store the user agent header of a request when a new session is created. On subsequent request, the user [...]
Soft Deletable Behavior and the Model::exists() gotcha
If you ever used the Soft Deletable Behavior, you will realise that Model::del() always returns a FALSE. This is expected after knowing that the behavior intercepts the delete request by saving the deleted flag and date then returning FALSE so the actual delete don’t happen.
So since I can’t rely on the returned value of Model::del(), [...]
Multiple Validation Sets in CakePHP
Jonathon Snook wrote about multiple validation sets in CakePHP and it reminded me how often we require rather different sets of validation rules for a single model. I have always enjoyed learning how others approached similar problems so I think I shall share mine too.
A very relevant example is the User model where we usually [...]
Extracting PO file with CakePHP I18n Shell
I have always been religiously wrapping __() and __n() around my texts knowing that it needs to be localized some day. Then it got to me that I never knew how to actually localize it! Out of curiosity, I went ahead to extract the PO file using the I18n shell.
What it does is basically [...]



!["Empire State of Mind" Jay-Z | Alicia Keys [OFFICIAL VIDEO]](http://i.ytimg.com/vi/0UjsXo9l6I8/default.jpg)



CakePHP’s HtmlHelper::link() Escaping of Attribute Values Gotcha