Hi, i'am trying to setup an DI with repository patterns. However when i create a controller constructor like:
public function __construct($f3, Actor $actor) {}
i get an error, second param should be object but is array
i tried
public function __construct($f3, $params, Actor $actor) {}
i get an error, third param should be object but is string
i tried
public function __construct($f3, $params, $string, Actor $actor) {}
and got error, 4 params expected 3 given.
I deduced by testing the second param is the route in array and the third param is indeed a string with the called controller->method i setup in my routes. Clearly F3 injects via the routing the 3 params into the controller constructor. (PS: the first param is always \Base object, so i cannot use that one either it seems)
Two questions: How can i create my own dependency injection within routing? Is that even possible?