Gonzalo Ayuso's Blog: Moving singleton and factory patterns to A...

Courtesy PHPDeveloper.org  Wed, 01/27/2010 - 13:55

Gonzalo Ayuso came across a situation where he needed to create a factory method inside of multiple classes but didn't want to have to create them each time.

With class inheritance there had to be another way.

I have built a backend library.

I have a tree of classes and i want to use singleton and factory patterns to my class set. Easy isn't it?

[...] Now imagine you have a lot of classes. You must create...


 

More related items

Gonzalo Ayuso's Blog: Function decorators in PHP with...
Gonzalo Ayuso has a new post to his blog looking at some of the recent work he's done with PHPDoc and annotations to create "function decorators" in his code. The idea is to solve the same...

My PHP framework winner predictions - Lukas Smith
First up, I can only claim to be an expert in Symfony2. My knowledge of other PHP frameworks basically consists of actively following twitter for things related to PHP, reading planet-php.org...

Gonzalo Ayuso's Blog: Building a small microframework...
Continuing on with his previous investigations into microframworks and what it takes to create them, Gonzalo Ayuso has posted his second part of the series - a look at working on the command...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com