From c3ede29de811c48a4407a7a9adaba612d9e486a0 Mon Sep 17 00:00:00 2001 From: Dominik Liebler Date: Tue, 24 Sep 2013 13:39:25 +0200 Subject: [PATCH] README Multiton --- Multiton/Multiton.php | 15 +-------------- Multiton/README.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 Multiton/README.md diff --git a/Multiton/Multiton.php b/Multiton/Multiton.php index 1dddebb..cacc79b 100644 --- a/Multiton/Multiton.php +++ b/Multiton/Multiton.php @@ -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 { diff --git a/Multiton/README.md b/Multiton/README.md new file mode 100644 index 0000000..938de9c --- /dev/null +++ b/Multiton/README.md @@ -0,0 +1,12 @@ +# Multiton + +**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)