{"action":"created","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/1316","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/1316/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1316/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/1316/events","html_url":"https://github.com/slimphp/Slim/issues/1316","id":91119524,"number":1316,"title":"urlFor() is a misnomer; proposal for pathFor() and/or an actual urlFor() in 3.x","user":{"login":"rszrama","id":17675,"avatar_url":"https://avatars.githubusercontent.com/u/17675?v=3","gravatar_id":"","url":"https://api.github.com/users/rszrama","html_url":"https://github.com/rszrama","followers_url":"https://api.github.com/users/rszrama/followers","following_url":"https://api.github.com/users/rszrama/following{/other_user}","gists_url":"https://api.github.com/users/rszrama/gists{/gist_id}","starred_url":"https://api.github.com/users/rszrama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rszrama/subscriptions","organizations_url":"https://api.github.com/users/rszrama/orgs","repos_url":"https://api.github.com/users/rszrama/repos","events_url":"https://api.github.com/users/rszrama/events{/privacy}","received_events_url":"https://api.github.com/users/rszrama/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/slimphp/Slim/labels/pending%20feedback","name":"pending feedback","color":"DDDDDD"},{"url":"https://api.github.com/repos/slimphp/Slim/labels/Slim%203","name":"Slim 3","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-06-26T01:21:37Z","updated_at":"2015-06-28T01:11:59Z","closed_at":null,"body":"I'm taking the time to learn Slim 3.x after learning about it from Josh, and I came across this function in the Router. It's very helpful, but it's a misnomer in that it doesn't actually provide URLs for named routes. It provides paths to those routes with argument replacement. It lacks the protocol or domain name that would be required for the return value to be considered a URL.\r\n\r\nTo remedy this, I propose at least renaming the existing function to pathFor(), which is still very useful i its own right. If you wanted, you could then also provide a urlFor() function that includes the protocol and domain in its return value. (I wouldn't recommend doing what Drupal has done by overloading url() to return either a path by default or a full URL if 'absolute' => TRUE.)\r\n\r\nI'm happy to submit a pull request in this direction but figured it best to get feedback before doing so. :smile: "},"comment":{"url":"https://api.github.com/repos/slimphp/Slim/issues/comments/116181433","html_url":"https://github.com/slimphp/Slim/issues/1316#issuecomment-116181433","issue_url":"https://api.github.com/repos/slimphp/Slim/issues/1316","id":116181433,"user":{"login":"Codexing","id":10149705,"avatar_url":"https://avatars.githubusercontent.com/u/10149705?v=3","gravatar_id":"","url":"https://api.github.com/users/Codexing","html_url":"https://github.com/Codexing","followers_url":"https://api.github.com/users/Codexing/followers","following_url":"https://api.github.com/users/Codexing/following{/other_user}","gists_url":"https://api.github.com/users/Codexing/gists{/gist_id}","starred_url":"https://api.github.com/users/Codexing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codexing/subscriptions","organizations_url":"https://api.github.com/users/Codexing/orgs","repos_url":"https://api.github.com/users/Codexing/repos","events_url":"https://api.github.com/users/Codexing/events{/privacy}","received_events_url":"https://api.github.com/users/Codexing/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T01:11:59Z","updated_at":"2015-06-28T01:11:59Z","body":"Personally if this is to happen I think deprecating the function with the alias is a nice way to go as suggested by @codeguy."}}