Merge branch 'READMEs'

This commit is contained in:
Dominik Liebler
2013-09-24 14:23:10 +02:00
55 changed files with 365 additions and 309 deletions

View File

@@ -3,19 +3,7 @@
namespace DesignPatterns\Singleton;
/**
* Singleton pattern
*
* --------------------------------------------------------------------------------------------------------------
* THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND MAINTAINABILITY USE DEPENDENCY INJECTION!
* --------------------------------------------------------------------------------------------------------------
*
* Purpose:
* to have only one instance of this object in the application that will handle all calls
*
* Examples:
* - DB Connector
* - Logger (may also be a Multiton if there are many log files for several purposes)
* - Lock file for the application (there is only one in the filesystem ...)
* class Singleton
*/
class Singleton
{