improved writing
This commit is contained in:
parent
8f42bb59ad
commit
159c7d78ab
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
### Inversion of Control
|
||||
|
||||
In the last part you have set up a controller and were able to generate output with `echo`. But let's not forget that you have a nice object oriented HTTP abstraction available. But you still need to make it accessible inside the controller class.
|
||||
In the last part you have set up a controller and generated output with `echo`. But let's not forget that you have a nice object oriented HTTP abstraction available. But right now it's not accessible inside your class.
|
||||
|
||||
The sane option is to use [inversion of control](http://en.wikipedia.org/wiki/Inversion_of_control). This means that instead of giving the class the responsiblity of creating the object it needs, you just ask for them. This is done with [dependency injection](http://en.wikipedia.org/wiki/Dependency_injection).
|
||||
|
||||
|
|
Loading…
Reference in a new issue