{"action":"reopened","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/2105","repository_url":"https://api.github.com/repos/slimphp/Slim","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/2105/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/2105/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/2105/events","html_url":"https://github.com/slimphp/Slim/issues/2105","id":195360158,"number":2105,"title":"Get Params in Middleware and Return Object","user":{"login":"liko28s","id":9079747,"avatar_url":"https://avatars.githubusercontent.com/u/9079747?v=3","gravatar_id":"","url":"https://api.github.com/users/liko28s","html_url":"https://github.com/liko28s","followers_url":"https://api.github.com/users/liko28s/followers","following_url":"https://api.github.com/users/liko28s/following{/other_user}","gists_url":"https://api.github.com/users/liko28s/gists{/gist_id}","starred_url":"https://api.github.com/users/liko28s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liko28s/subscriptions","organizations_url":"https://api.github.com/users/liko28s/orgs","repos_url":"https://api.github.com/users/liko28s/repos","events_url":"https://api.github.com/users/liko28s/events{/privacy}","received_events_url":"https://api.github.com/users/liko28s/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-13T20:30:59Z","updated_at":"2016-12-14T07:28:08Z","closed_at":null,"body":"Hi guys, I'm trying to get a String argument from route, proccess it in high level middleware and then return to the component itself\r\n\r\nThis is the MiddleWare\r\n```\r\n$dateMw = function ($request, $response, $next) {\r\n    $lastSyncDate = $request->getAttribute('routeInfo')[2]['lastSyncDate'];\r\n    $date = new \\DateTime();\r\n    $date->setTimeStamp(strtotime($lastSyncDate));\r\n    return $next($request, $response,$date);\r\n};\r\n```\r\nBut in my element the third param remains expecting $args (an array)\r\n\r\nI like\r\n```\r\n$app->get('/{lastSyncDate}', function(Request $request, Response $response, DateTime $lastSyncDate){\r\n        $referenceList = new ReferenceList($this->db);\r\n        return $response->withJson(['REFERENCE' => $referenceList->getUpdates($lastSyncDate)->values()]);\r\n    })->add($dateMw);\r\n```\r\nHow i can do this?"}}
{"actor":{"display_login":"akrabat"}}