Making CakePHP controller independent of how parameters are sent

Recently, I felt the need to make my CakePHP based controllers independent of how  parameters are sent. For instance, in Memento, I can handle parameters sent either in traditional way or using CakePHP style or even using the form (see usage below)
       Example (see how owner value is sent differently in the URL below)
           Traditional Way: http://www.findnwrite.com/memento/articles_users/library/?owner=2  
           CakePHP way: http://findnwrite.com/memento/articles_users/library/owner:2  
 To make my controllers [...]

Removing blank spaces before and after PHP tags – Part II

Last month I posted a PHP script to find all the blank spaces before and after PHP opening (<?php ) and closing tag ( ?>). The script works nicely, but it only identifies files having blank spaces or lines before or after PHP tag. It does not remove them.
Luckily, I came across a google group discussion [...]

Script for removing blank spaces before and after PHP tags

 
For last four days, I have been trying to get a valid RSS output using CakePHP. Everything was working fine, except that there were some blank spaces before RSS declaration. Because of this, none of the browsers were recognizing cakephp output as RSS feed. The problem was simple; I left blank spaces and few new lines before and after PHP [...]

CakePHP Tricks for manipulating URL in the view

This week, I learnt many new tricks in CakePHP. Below are some of them
1. Get current URL in the view (Thanks to Grant Cox for this one) :
Use  Router::url(“”, true) to get current URL in the view. The second boolean parameter tells whether the path should be absolute or relative. Ideally Router::url(“”, true) should return an [...]