PHP-Code:
$fooAction = function(RequestContract $request, RoutePropertyContract $route)
{
$something = $this->service('something',['foo' => 12345, 'bar' => 'baz']);
$something->send($request->get('that', null), $route->get('id'));
return $this->response($this->service('twig')->render('foo.twig', $something->getResult()));
};
$actionFacade = $someDIC->make(ActionFacade::class);
$concreteAction = $fooAction->bindTo($actionFacade);
$someDIC->call($concreteAction);
vg
jack
Kommentar