Dependency Injection

When services are instantiated by the application container if their constructors specify other classes as parameters, Disco will resolve those classes from container and pass their references to the constructor as arguments.

public function __construct(SomeClass $c1,SomeClass2 $c2){
    $this->c1 = $c1;
    $this->c2 = $c2;
}