public function getPath(UriInterface $uri) { $path = trim($uri->getPath(), '/'); $parts = explode('/', $path); if ($parts[0] === 'v' . Client::API_VERSION) { unset($parts[0]); } return '/' . implode('/', $parts); }