{"action":"created","issue":{"url":"https://api.github.com/repos/Luracast/Restler/issues/493","labels_url":"https://api.github.com/repos/Luracast/Restler/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/Luracast/Restler/issues/493/comments","events_url":"https://api.github.com/repos/Luracast/Restler/issues/493/events","html_url":"https://github.com/Luracast/Restler/issues/493","id":111558702,"number":493,"title":"Resources::$placeFormatExtensionBeforeDynamicParts not obeyed.","user":{"login":"tallsam","id":700671,"avatar_url":"https://avatars.githubusercontent.com/u/700671?v=3","gravatar_id":"","url":"https://api.github.com/users/tallsam","html_url":"https://github.com/tallsam","followers_url":"https://api.github.com/users/tallsam/followers","following_url":"https://api.github.com/users/tallsam/following{/other_user}","gists_url":"https://api.github.com/users/tallsam/gists{/gist_id}","starred_url":"https://api.github.com/users/tallsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tallsam/subscriptions","organizations_url":"https://api.github.com/users/tallsam/orgs","repos_url":"https://api.github.com/users/tallsam/repos","events_url":"https://api.github.com/users/tallsam/events{/privacy}","received_events_url":"https://api.github.com/users/tallsam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Arul-","id":2255137,"avatar_url":"https://avatars.githubusercontent.com/u/2255137?v=3","gravatar_id":"","url":"https://api.github.com/users/Arul-","html_url":"https://github.com/Arul-","followers_url":"https://api.github.com/users/Arul-/followers","following_url":"https://api.github.com/users/Arul-/following{/other_user}","gists_url":"https://api.github.com/users/Arul-/gists{/gist_id}","starred_url":"https://api.github.com/users/Arul-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arul-/subscriptions","organizations_url":"https://api.github.com/users/Arul-/orgs","repos_url":"https://api.github.com/users/Arul-/repos","events_url":"https://api.github.com/users/Arul-/events{/privacy}","received_events_url":"https://api.github.com/users/Arul-/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-15T07:15:53Z","updated_at":"2015-10-16T02:15:54Z","closed_at":null,"body":"Hi Arul,\r\n\r\nI'm on RC6.\r\n\r\nI've set `Resources::$placeFormatExtensionBeforeDynamicParts = false;` in my index.php\r\nAlso tried `Explorer::$placeFormatExtensionBeforeDynamicParts = false;`\r\n\r\nMy GET endpoint is showing in Explorer as `/v1/weatherstations/nearby.json/{latitude}/{longitude}/{radius}`.\r\n\r\nI would like it to be `/v1/weatherstations/nearby/{latitude}/{longitude}/{radius}.json`\r\n\r\nIs this possible?\r\n\r\nI can get this behaviour by commenting out Resources.php:275-283 but I'm not sure if this has further implications.\r\n\r\n````\r\n                if (count($parts) == 1 && $httpMethod == 'GET') {\r\n                } else {\r\n                    for ($i = 0; $i < count($parts); $i++) {\r\n                        if (strlen($parts[$i]) && $parts[$i]{0} == '{') {\r\n                            $pos = $i - 1;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n````\r\n\r\nCheers,\r\nSam.\r\n"},"comment":{"url":"https://api.github.com/repos/Luracast/Restler/issues/comments/148577091","html_url":"https://github.com/Luracast/Restler/issues/493#issuecomment-148577091","issue_url":"https://api.github.com/repos/Luracast/Restler/issues/493","id":148577091,"user":{"login":"tallsam","id":700671,"avatar_url":"https://avatars.githubusercontent.com/u/700671?v=3","gravatar_id":"","url":"https://api.github.com/users/tallsam","html_url":"https://github.com/tallsam","followers_url":"https://api.github.com/users/tallsam/followers","following_url":"https://api.github.com/users/tallsam/following{/other_user}","gists_url":"https://api.github.com/users/tallsam/gists{/gist_id}","starred_url":"https://api.github.com/users/tallsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tallsam/subscriptions","organizations_url":"https://api.github.com/users/tallsam/orgs","repos_url":"https://api.github.com/users/tallsam/repos","events_url":"https://api.github.com/users/tallsam/events{/privacy}","received_events_url":"https://api.github.com/users/tallsam/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T02:15:54Z","updated_at":"2015-10-16T02:15:54Z","body":"My solution was to add a check for `$placeFormatExtensionBeforeDynamicParts` to the `if` statement.\r\n````\r\n                if (count($parts) == 1 && $httpMethod == 'GET') {\r\n                } else {\r\n                    for ($i = 0; $i < count($parts); $i++) {\r\n                        if (strlen($parts[$i]) && $parts[$i]{0} == '{' && !static::$placeFormatExtensionBeforeDynamicParts) {\r\n                            $pos = $i - 1;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n````"}}