Posts Tagged by singleton

PHP Tutorial: The Legend of the Singleton

I'm enjoying this experiment in explaining design patterns through storytelling, so today's is the Singleton Pattern. Long, long ago and far, far away, a king commissioned all his wizards to create a single repository of all the kingdom's knowledge. In the kingdom's language, their word for knowledge was "data" and this repository was supposed to…