{"action":"created","issue":{"url":"https://api.github.com/repos/dannyvankooten/PHP-Router/issues/54","labels_url":"https://api.github.com/repos/dannyvankooten/PHP-Router/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/dannyvankooten/PHP-Router/issues/54/comments","events_url":"https://api.github.com/repos/dannyvankooten/PHP-Router/issues/54/events","html_url":"https://github.com/dannyvankooten/PHP-Router/pull/54","id":66930415,"number":54,"title":"Added parameters by name","user":{"login":"Antoine-Pous","id":7486600,"avatar_url":"https://avatars.githubusercontent.com/u/7486600?v=3","gravatar_id":"","url":"https://api.github.com/users/Antoine-Pous","html_url":"https://github.com/Antoine-Pous","followers_url":"https://api.github.com/users/Antoine-Pous/followers","following_url":"https://api.github.com/users/Antoine-Pous/following{/other_user}","gists_url":"https://api.github.com/users/Antoine-Pous/gists{/gist_id}","starred_url":"https://api.github.com/users/Antoine-Pous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antoine-Pous/subscriptions","organizations_url":"https://api.github.com/users/Antoine-Pous/orgs","repos_url":"https://api.github.com/users/Antoine-Pous/repos","events_url":"https://api.github.com/users/Antoine-Pous/events{/privacy}","received_events_url":"https://api.github.com/users/Antoine-Pous/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-07T16:29:58Z","updated_at":"2015-06-15T10:54:46Z","closed_at":"2015-06-15T10:54:41Z","pull_request":{"url":"https://api.github.com/repos/dannyvankooten/PHP-Router/pulls/54","html_url":"https://github.com/dannyvankooten/PHP-Router/pull/54","diff_url":"https://github.com/dannyvankooten/PHP-Router/pull/54.diff","patch_url":"https://github.com/dannyvankooten/PHP-Router/pull/54.patch"},"body":"Parameters by name add simple way to get named parameters into the controller method.\r\nThis optionnal argument, set to false by default, is available from setFilters method and can be used individually for each route.\r\n\r\nRoute :\r\n```PHP\r\n$route = new Route('/:page_id',     ['_controller' => 'someController::myMethod', 'methods' => 'GET' ]);\r\n$route->setFilters([':page_id' => '([a-zA-Z]+)'], true);\r\n```\r\n\r\nController :\r\n```PHP\r\nclass someController\r\n{\r\n  public function myMethod() {\r\n    var_dump(func_get_args());\r\n    // display : array(1) { [0]=> array(1) { [\"page_id\"]=> string(5) \"mySuperPage\" } }\r\n  }\r\n}\r\n```\r\n\r\nThis feature makes sense when applied many filters."},"comment":{"url":"https://api.github.com/repos/dannyvankooten/PHP-Router/issues/comments/112017336","html_url":"https://github.com/dannyvankooten/PHP-Router/pull/54#issuecomment-112017336","issue_url":"https://api.github.com/repos/dannyvankooten/PHP-Router/issues/54","id":112017336,"user":{"login":"malukenho","id":3275172,"avatar_url":"https://avatars.githubusercontent.com/u/3275172?v=3","gravatar_id":"","url":"https://api.github.com/users/malukenho","html_url":"https://github.com/malukenho","followers_url":"https://api.github.com/users/malukenho/followers","following_url":"https://api.github.com/users/malukenho/following{/other_user}","gists_url":"https://api.github.com/users/malukenho/gists{/gist_id}","starred_url":"https://api.github.com/users/malukenho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malukenho/subscriptions","organizations_url":"https://api.github.com/users/malukenho/orgs","repos_url":"https://api.github.com/users/malukenho/repos","events_url":"https://api.github.com/users/malukenho/events{/privacy}","received_events_url":"https://api.github.com/users/malukenho/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T10:54:46Z","updated_at":"2015-06-15T10:54:46Z","body":"Thanks @Antoine-Pous :beers: \r\nSorry for the very late reply, I'll spend more time on PHP-Route this month"}}