In this post I reveal one of my tricks on how to leverage 3.x power in a legacy 2.x project. You might have already read on how to use some of the splits, like the ORM, in 2.x projects. Today…
Tag: CakePHP2
CakePHP 2.6 – and the end of the beginning
I was first thinking about the title "and the beginning of the end" – but that sounded a little bit too Armageddon. In fact, 2.x will probably still be around for years – and at least 2.7 will still be…
UTF8 can be tricky – especially with PHP
Everybody uses (or should!) UTF8 these days. An easy and fully supporting PHP version I did not come across yet, though. It seems there is sometimes more to it. This article is supposed to guideline the basic setup of a…
CakePHP 2.5 arrived + CakePHP Tips 2014
You probably read my last tip sections. And I started to move some of them to my sandbox app. But once in a while it might also be nice to publish a few selected tips, here as well. Oh, and…
Generating PDFs with CakePHP
The recommended approach is to use the CakePHP plugin CakePdf for this. With that plugin it is "a piece of cake" to output HTML views as PDF or render them to files for download/emailing etc. You can obviously just use…
CakePHP and NamedScope for DRY conditions
A behavior for CakePHP 2.x Background I stumbled upon this fork and SimpleScope. The latter has the disadvantage of redundancy in the scope conditions when used in multiple find configs. The first was pretty much how Rails’ scopes work. But…
AJAX and CakePHP
I don’t know why I didn’t post about AJAX earlier. It is probably one of the topics that most don’t really know how to approach. The docs don’t say much about it, and so many try to rely on (outdated)…
Queue – Deferred execution in CakePHP
At the beginning of 2.x I ported the Queue plugin from 1.x to 2.0 and started to integrate it into a few apps of mine. Since then it was running OK, but neither with fixed tests, nor with any real…
ResetBehavior and HazardableBehavior
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…