mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-10 17:04:01 +02:00
Change index.rst to README.rst
remove all pattern's README.md
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
# Delegation
|
||||
|
||||
## Purpose
|
||||
|
||||
...
|
||||
|
||||
## Examples
|
||||
|
||||
...
|
||||
|
||||
## UML Diagram
|
||||
|
||||

|
9
More/README.rst
Normal file
9
More/README.rst
Normal file
@@ -0,0 +1,9 @@
|
||||
More
|
||||
====
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
|
||||
Delegation/README
|
||||
ServiceLocator/README
|
||||
Repository/README
|
@@ -1,16 +0,0 @@
|
||||
# Repository
|
||||
|
||||
## Purpose
|
||||
|
||||
Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.
|
||||
Repository encapsulates the set of objects persisted in a data store and the operations performed over them, providing a more object-oriented view of the persistence layer.
|
||||
Repository also supports the objective of achieving a clean separation and one-way dependency between the domain and data mapping layers.
|
||||
|
||||
## Examples
|
||||
|
||||
* Doctrine 2 ORM: there is Repository that mediates between Entity and DBAL and contains methods to retrieve objects
|
||||
* Laravel Framework
|
||||
|
||||
## UML Diagram
|
||||
|
||||

|
@@ -1,20 +0,0 @@
|
||||
# Service Locator
|
||||
|
||||
## Purpose
|
||||
|
||||
To implement a loosely coupled architecture in order to get better testable, maintainable and extendable code.
|
||||
DI pattern and Service Locator pattern are an implementation of the Inverse of Control pattern.
|
||||
|
||||
## Usage
|
||||
|
||||
With `ServiceLocator` you can register a service for a given interface. By using the interface you can retrieve the service
|
||||
and use it in the classes of the application without knowing its implementation. You can configure and inject the
|
||||
Service Locator object on bootstrap.
|
||||
|
||||
## Examples
|
||||
|
||||
* Zend Framework 2 uses Service Locator to create and share services used in the framework(i.e. EventManager, ModuleManager, all custom user services provided by modules, etc...)
|
||||
|
||||
## UML Diagram
|
||||
|
||||

|
@@ -1,9 +0,0 @@
|
||||
More
|
||||
====
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
|
||||
Delegation/index
|
||||
ServiceLocator/index
|
||||
Repository/index
|
Reference in New Issue
Block a user