You are here

public function RESTServer::uri_formatter in Services 7.3

Same name and namespace in other branches
  1. 6.3 servers/rest_server/includes/RESTServer.inc \RESTServer::uri_formatter()

Formats a resource uri

Parameters

array $path: An array of strings containing the component parts of the path to the resource.

Return value

string Returns the formatted resource uri

File

servers/rest_server/includes/RESTServer.inc, line 259
Class for handling REST calls.

Class

RESTServer
@file Class for handling REST calls.

Code

public function uri_formatter($path) {
  return url($this->context
    ->getEndpointPath() . '/' . join('/', $path), array(
    'absolute' => TRUE,
  ));
}