File tree Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,52 @@ Install by composer
19
19
composer require sandfoxme/phpstorm-metadata-export --dev
20
20
```
21
21
22
+ ## Containers
23
+
24
+ ### Pimple
25
+
26
+ The library has full support for the Pimple DI version 3.*
27
+
28
+ ### Zend ServiceManager
29
+
30
+ The library has partial support for the Zend ServiceManager. Please note that there's no open and public way
31
+ of iterating over SM entries so the implementation is tied to the internal structure not covered by
32
+ the semantic version compatibility promise. Feel free to open an issue if it is broken for some scenario
33
+
34
+ Obviously the implementation also cannot create hints for abstract factories
35
+
36
+ The library is tested against Zend SM version 3.3 and should work with any 3.* version
37
+
22
38
## Usage
23
39
24
- The library supports Pimple DI and has integration classes available for Slim and Silex.
40
+ The library has integration classes available for Slim and Silex.
25
41
By default exporter will create directory ` .phpstorm.meta.php ` in the root path of your project
26
42
(where ` vendor ` directory is) and put metadata file to it on every request.
27
43
It is a good idea to enable integration components only in development environment.
28
44
Don't forget to gitignore your ` .phpstorm.meta.php ` directory.
29
45
46
+ ### Using Generator directly
47
+
48
+ ``` php
49
+ <?php
50
+
51
+ use SandFoxMe\PhpStorm\Metadata\Generator;
52
+
53
+ $container = new Container();
54
+
55
+ file_put_contents(
56
+ '/path/to/project/.phpstorm.meta.php/my_export_file.meta.php',
57
+ Generator::get([$container])
58
+ );
59
+
60
+ // OR
61
+
62
+ Generator::store(
63
+ '/path/to/project/.phpstorm.meta.php/my_export_file.meta.php',
64
+ [$container]
65
+ );
66
+ ```
67
+
30
68
### Slim
31
69
32
70
Add middleware class ` SandFoxMe\PhpStorm\Metadata\Integration\Slim\ContainerExportMiddleware ` to your Slim app.
You can’t perform that action at this time.
0 commit comments