Snorlax\RestResource::getPath PHP Method

getPath() private method

Returns the URI path for the request
private getPath ( array $action, array $args ) : mixed
$action array
$args array
return mixed
    private function getPath(array $action, array $args)
    {
        $pattern = '/{(\\d+)}/';
        $callback = function ($matches) use($args) {
            return $args[$matches[1]];
        };
        return preg_replace_callback($pattern, $callback, $action['path']);
    }