Skip to content

Latest commit

 

History

History

Registry

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Purpose

To implement a central storage for objects often used throughout the application, is typically implemented using an abstract class with only static methods (or using the Singleton pattern). Remember that this introduces global state, which should be avoided at all times! Instead implement it using Dependency Injection!

UML Diagram

Alt Registry UML Diagram

Code

You can also find this code on GitHub

Registry.php

Registry.php

Service.php

Service.php

Test

Tests/RegistryTest.php

Tests/RegistryTest.php