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
@@ -17,6 +17,7 @@ Nette DI is one of the most interesting part of framework. It is compiled DI con
17
17
18
18
Documentation can be found on the [website](https://doc.nette.org/dependency-injection).
19
19
20
+
<!---->
20
21
21
22
[Support Me](https://github.com/sponsors/dg)
22
23
--------------------------------------------
@@ -27,6 +28,7 @@ Do you like Nette DI? Are you looking forward to the new features?
27
28
28
29
Thank you!
29
30
31
+
<!---->
30
32
31
33
Installation
32
34
------------
@@ -39,6 +41,7 @@ composer require nette/di
39
41
40
42
It requires PHP version 8.1 and supports PHP up to 8.3.
41
43
44
+
<!---->
42
45
43
46
Usage
44
47
-----
@@ -177,6 +180,8 @@ $manager->distribute(...);
177
180
178
181
Significant to Dependency Injection is that no class depends on the container. Thus it can be easily replaced with another one. For example with the container generated by Nette DI.
179
182
183
+
<!---->
184
+
180
185
Nette DI
181
186
----------
182
187
@@ -218,6 +223,7 @@ During development it is useful to activate auto-refresh mode which automaticall
218
223
$loader = new Nette\DI\ContainerLoader(__DIR__ . '/temp', autoRebuild: true);
219
224
```
220
225
226
+
<!---->
221
227
222
228
Services
223
229
--------
@@ -291,6 +297,7 @@ class FooClass
291
297
However, this method is not ideal, because the variable must be declared as public and there is no way how you can ensure that the passed object will be of the given type. We also lose the ability to handle the assigned dependency in our code and we violate the principles of encapsulation.
0 commit comments