phpGOF gives the basic interface to using design pattern in your php code