FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

DesignPatternsPHP/Creational/Singleton at master · smashou/DesignPatternsPHP · GitHub

Repository navigation

Latest commit

 

History

History
 
 
  1. DesignPatternsPHP
  2. Creational

Singleton

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Singleton

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 ...)

UML Diagram


Back | FazBrowse Home | New Git URL