Pages

Categories

A simple Filter Chain example in PHP 5

Filter chains can be really useful when you want to pass an object (or several objects) through a series of tests in a scalable fashion. An example may be performing some request validation/filtering before your application starts to do anything too specific with it.
The idea behind a filter chain is that you create a […]

August 19th, 2007 | PHP | 5 Comments »

First signs of namespaces in PHP 6

Every so often I grab the latest PHP 6 snapshot from snaps.php.net just to see what’s been going on in the development of it. Today I downloaded a snapshot as usual and was pleased to see they’ve already started to include support for namespacing.
Unicode improvements aside, namespacing is something I’ve longed for in PHP […]

August 17th, 2007 | PHP | 5 Comments »

A lightweight and flexible front controller for PHP 5

Apparently the front controller is a commonly misunderstood design pattern so I figured I’d throw out some thoughts to the masses.
To put it simply, a Front Controller is a gateway to an application. All requests hit the front controller leaving it to decide what to do next. Typically a front controller will set […]

August 12th, 2007 | PHP | 19 Comments »

A MySQL Class/Iterator for PHP5

After some discussion over at DevNetwork Forums regarding MySQL classes I was given an idea which changes the way I’ve always written MySQL wrappers. Previously there had always been just one class. That class returned result resources and provided the wrapper methods for working with these.
The inspiration I was given in this scenario […]

July 26th, 2006 | PHP | 3 Comments »