/** * Formats the uri, it replaces the parameters with the values it has retrieved from * the request object. * * @param $values * @return mixed */ private function formatUri($values) { $uri = $this->request->getUri(); foreach ($values as $parameter => $value) { $uri = str_replace(":" . $parameter, $value, $uri); } return $uri; }