Refactor Web\UrlManager (getCanonicalByDocument, getByFunction)