Open Ecaz opened 10 years ago
Question, in what kind of implementation are you trying to achieve?
What do you mean? The project I'm working on right now would get data from a database based on the get request. So if they browse to /get/port/12345 they would get port info for user 12345. Except it's an API so they wouldn't browse to it
And I might add that I'm not a fan of singleton.
This is how Toro serve handler:
$result = call_user_func_array(array($handler_instance, $request_method), $regex_matches);
So if you change it to something like this:
$result = call_user_func_array(array($handler_instance, $regex_matches[1]), array($regex_matches[2]));
And define it like /{controller}/{action}/{params} This might work.
Hello! I just picked up ToroPHP and I normally use DI when I do any kind of database interaction.
Rough example
But ToroPHP doesn't allow you to do this, is there any way to get around this? I don't wanna use a global variable.