README Multiton

This commit is contained in:
Dominik Liebler
2013-09-24 13:39:25 +02:00
parent 580e6ec9a8
commit c3ede29de8
2 changed files with 13 additions and 14 deletions

View File

@@ -3,20 +3,7 @@
namespace DesignPatterns;
/**
* Multiton pattern
*
* --------------------------------------------------------------------------------------------------------------
* THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND MAINTAINABILITY USE DEPENDENCY INJECTION!
* --------------------------------------------------------------------------------------------------------------
*
* Purpose:
* to have only a list of named instances that are used, like a singleton but with n instances
*
* Examples:
* - 2 DB Connectors, e.g. one for MySQL, the other for SQLite
* - multiple Loggers (one for debug messages, one for errors)
*
*
* class Multiton
*/
class Multiton
{