{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/1926","repository_url":"https://api.github.com/repos/cakephp/cakephp","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/1926/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/1926/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/1926/events","html_url":"https://github.com/cakephp/cakephp/issues/1926","id":20894015,"number":1926,"title":"Router should provide returning as array","user":{"login":"lh-import","id":5175817,"avatar_url":"https://avatars.githubusercontent.com/u/5175817?v=3","gravatar_id":"","url":"https://api.github.com/users/lh-import","html_url":"https://github.com/lh-import","followers_url":"https://api.github.com/users/lh-import/followers","following_url":"https://api.github.com/users/lh-import/following{/other_user}","gists_url":"https://api.github.com/users/lh-import/gists{/gist_id}","starred_url":"https://api.github.com/users/lh-import/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lh-import/subscriptions","organizations_url":"https://api.github.com/users/lh-import/orgs","repos_url":"https://api.github.com/users/lh-import/repos","events_url":"https://api.github.com/users/lh-import/events{/privacy}","received_events_url":"https://api.github.com/users/lh-import/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Enhancement","name":"Enhancement","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/78","html_url":"https://github.com/cakephp/cakephp/milestones/2.9.0","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/78/labels","id":1568362,"number":78,"title":"2.9.0","description":"New features API compatible with 2.x","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":14,"state":"open","created_at":"2016-02-07T01:57:21Z","updated_at":"2016-05-20T22:30:31Z","due_on":"2016-07-10T04:00:00Z","closed_at":null},"comments":4,"created_at":"2013-10-11T20:54:08Z","updated_at":"2016-05-20T22:30:31Z","closed_at":"2016-05-20T22:30:31Z","body":"Created by **[euromark](https://github.com/dereuromark)**, 3rd Jan 2012. *(originally [Lighthouse ticket #2431](http://cakephp.lighthouseapp.com/projects/42648/tickets/2431))*:\n- - - -\n\nbased on initial thread:\r\nhttp://groups.google.com/group/cake-php/browse_thread/thread/887d78da3921dd68\r\n\r\ncurrent methods either return a string - Router::url - or a complex multilevel array with named and pass sub-arrays.\r\n\r\nthe router method should be able to return the url as a one-leveled (flat) array for post-processing before passing it on to Html::link() or doing sth else with it etc.\r\nThis is often the case when we want to add some named or pass params or some hash.\r\nEspecially since Cake is handling most of the internal urls as array such a functionality is missing.\r\n\r\nexample: \r\n\r\n    admin/authplugin/users/edit/2 \r\n\r\nI would expect to find some router method to get \r\n\r\n    $url = array( \r\n        'admin' => 1,\r\n        'plugin' => 'authplugin',\r\n        'controller' => 'users',\r\n        'action' => 'edit',\r\n        2, \r\n        'key' => 'val'\r\n    );\r\n\r\nfor example - maybe with a method Router::urlAsArray():\r\n\r\n    $array = Router::urlAsArray('action'=>'edit', 2, 'key'=>'val');\r\n\r\nwhich would be pretty much exactly what we normally pass on to the url generating methods.\r\n\r\nit would also be similar to the result of Router::parse() but it already \r\ncontains the passed and named params as expected to easily adjust it before passing it to Html::url() or Html::link(): \r\n\r\n    $url[#] = 'somehash'; \r\n    or \r\n    $url[] = 'somepassedparam'; \r\n    or \r\n    $url['key'] = 'somenamedparam'; \r\n    echo $this->Html->link('Title', $url);\r\n\r\ncurrently we have to concatenate extra params with the final url string or resolve the complex url array manually."},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/220733720","html_url":"https://github.com/cakephp/cakephp/issues/1926#issuecomment-220733720","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/1926","id":220733720,"user":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T22:30:31Z","updated_at":"2016-05-20T22:30:31Z","body":"Closing all enhancement requests that were not actioned in a long time. If you still think this a good idea and would like to help making this happen, please leave a comment."}}
{"actor":{"display_login":"lorenzo"}}