mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-30 08:19:12 +02:00
13 lines
365 B
Markdown
13 lines
365 B
Markdown
# 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)
|