Thursday, May 29, 2008

Design Pattern in PHP: Borg pattern

I thought about sharing some design patterns (expressed in PHP) I have documented. The first one is the borg. This design pattern serves as a good alternative option to the well-known singleton pattern.

The advantages of the borg are:

  1. no need in client classes for special creation / access methods
  2. easily sub-classed
  3. more easily testable

The project is located at GoogleCode.