Call user function for magic method PHP

Put a bit of work into upgrading the blog and might as well make a quick post now. Heres a trick to test if a class variable exists, isset or has a particular value dynamically. Call the magic method __get() for the variable name which you can generate on the fly.

Read the rest of the post…

Rolling out an API for your cakePHP app Part 1: The Problems

Recently I've put a lot of work into an API solution for a cakePHP app which addresses some of the architectural issues of creating an API in a cakePHP project. To start with I threw together a nice simple API as a proof of concept and to showcase the ease at which an API can be created quickly using the RequestHandler component. While that solution was fine and incredibly quick to whip up, there are some issues when it comes time to extend the API, the biggest of which is versioning.

Read the rest of the post…

1 2 3 4 5 6 7 8 9