You are here

function services_strip_hashes in Services 6.2

Cleanup function to remove unnecessary hashes from service definitions.

Parameters

array $array: A service definition or an array of service definitions.

Return value

void

5 calls to services_strip_hashes()
services_admin_browse_index in ./services_admin_browse.inc
Page callback to list all enabled services and servers.
services_admin_settings in ./services_admin_browse.inc
Build the admin settings form.
services_get_all in ./services.module
Get all service definitions
services_get_all_resources in ./services.module
Gets all resource definitions.
services_server in ./services.module
Callback for server endpoint.

File

./services.module, line 793
Provides a generic but powerful API for exposing web services.

Code

function services_strip_hashes(&$array) {
  foreach ($array as $key => $value) {
    if (is_array($value)) {
      services_strip_hashes($array[$key]);
    }
    if (strpos($key, '#') === 0) {
      $array[substr($key, 1)] = $array[$key];
      unset($array[$key]);
    }
  }
}