You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-3Lines changed: 38 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
# dot-annotated-services
2
2
3
-
DotKernel service creation component through zend-servicemanager and annotations
3
+
DotKernel component used to create services through [Zend Service Manager](https://github.com/zendframework/zend-servicemanager) and inject them with dependencies just using method annotations. It can also create services without the need to write factories. Annotation parsing can be cached, to improve performance.
4
+
5
+
This package can clean up your code, by getting rid of all the factories you write, sometimes just to inject a dependency or two.
6
+
7
+
**Requires PHP version >= 7.1**
4
8
5
9
## Installation
6
10
@@ -9,7 +13,7 @@ Run the following command in your project directory
After installing, add `ConfigProvider` to your configuration.
16
+
After installing, add the `ConfigProvider`class to your configuration aggregate.
13
17
14
18
## Usage
15
19
@@ -84,4 +88,35 @@ And that's it, you don't need to configure the service manager with this class,
84
88
85
89
## Cache annotations
86
90
87
-
@TODO: write documentation
91
+
This package is built on top of `doctrine/annotation` and `doctrine/cache`.
92
+
In order to cache annotations, you should register a service factory at key `AbstractAnnotatedFactory::CACHE_SERVICE` that should return a valid `Doctrine\Common\Cache\Cache` cache driver. See [Cache Drivers](https://github.com/doctrine/cache/tree/master/lib/Doctrine/Common/Cache) for available implementations offered by doctrine.
93
+
94
+
Below, we give an example, as defined in our frontend and admin starter applications
0 commit comments