mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 10:40:17 +02:00
@@ -4,7 +4,7 @@
|
|||||||
**THIS IS CONSIDERED TO BE AN ANTI-PATTERN!**
|
**THIS IS CONSIDERED TO BE AN ANTI-PATTERN!**
|
||||||
|
|
||||||
Service Locator is considered for some people an anti-pattern. It violates the Dependency Inversion principle.
|
Service Locator is considered for some people an anti-pattern. It violates the Dependency Inversion principle.
|
||||||
Service Locator hides class' dependencies instead of exposing them as you would do using the Dependency Injection. In case of changes of those dependencies you risk to break the functionality of classses which are using them, making your system difficult to maintain.
|
Service Locator hides class' dependencies instead of exposing them as you would do using the Dependency Injection. In case of changes of those dependencies you risk to break the functionality of classes which are using them, making your system difficult to maintain.
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
|
Reference in New Issue
Block a user