I usually don’t code at all and wouldn’t even consider myself much of a coder. I got a few PHP Classes such as dbHandler, contentHandler etc. und would like to use them global.
For example within my content Class I need to access the contentHandler in order to determine the kind of page etc.
Of course my Objects are non global and I’ve heard about design patterns such as singleton, factory, registry etc.
Which one to use in my case and how to? We are pretty much talking about 10-15 classes / objects, also there is no performance or code beauty required.
Which pattern should I use, why, and how? Thank you a lot!!!!
Aucun commentaire:
Enregistrer un commentaire