It's done here: https://github.com/zf-fr/zfr-rest/blob/master/src/ZfrRest/Router/Http/ResourceGraphRoute.php#L192