Add UrlGenerator trait
Merge pull request #804 from romainneutron/url-generator-trait

[3.9] Add UrlGenerator trait