You are here

function services_resource_uri_formatter in Services 7

Same name and namespace in other branches
  1. 6.2 services.module \services_resource_uri_formatter()

Registers a callback for formatting resource uri's. Use parameterless call to get the current formatter callback.

Parameters

mixed $callback: Optional. The callaback to register for uri formatting. No changes are made if this parameter is omitted or NULL.

Return value

mixed Returns the registered callback for resource uri formatting

1 call to services_resource_uri_formatter()
services_resource_uri in ./services.module
Formats a resource uri using the formatter registered through services_resource_uri_formatter().

File

./services.module, line 362
@author Services Dev Team

Code

function services_resource_uri_formatter($callback = NULL) {
  static $formatter;
  if ($callback !== NULL) {
    $formatter = $callback;
  }
  return $formatter;
}