Home » Archive for May, 2010

Sometimes, or very rarely we might need to access a model in AppController (Application Controller). This could be for fetching values from a table and make it available for all the controllers in the application (AppController is inherited by all the other controllers). Also, often we need to access models that are not associated with a controller. I...
Filed in: CakePHP, PHP/MySQL
Saving an image from a flash movie to user’s local machine hard-disk was a hectic task sometime back. To save Dynamic movie clips (which could be images or any bitmapData) on the stage as Images we had to send the whole pixel data to the server and process it to create an image, then download it on to the user machine. This task has now become...
One of the most powerful features of CakePHP is the ability to link relational mapping provided by the model. In CakePHP, the links between models are handled through associations. The associations are defined in the models as hasOne, hasMany, belongsTo etc. It is possible to define deep relationships involving many tables and retrieve data. But CakePHP...
Filed in: CakePHP, PHP/MySQL
Developers normally use functions that use Regular Expression to convert under_scored strings in to CamelCased strings. Usage of Regular Expression is quite heavy. We can use a simple yet powerful method to convert these strings to CamelCase without using RegEx in PHP. Here is the method: echo join(””, array_map(“ucwords”, explode(‘_’,...

Page optimized by WP Minify WordPress Plugin