You are here

function services_get_update_versions in Services 7.3

Returns the updates for a given resource method.

Parameters

$resource: A resource name.

$method: A method name.

Return value

an array with the major and minor api versions

2 calls to services_get_update_versions()
ServicesVersionTests::testVersion in tests/functional/ServicesVersionTests.test
Test connect method.
services_edit_form_endpoint_resources in plugins/export_ui/services_ctools_export_ui.class.php
services_edit_form_endpoint_resources function.

File

plugins/export_ui/services_ctools_export_ui.class.php, line 488
Export-ui handler for the Services module.

Code

function services_get_update_versions($resource, $method) {
  $versions = array();
  $updates = services_get_updates();
  if (isset($updates[$resource][$method]) && is_array($updates[$resource][$method])) {
    foreach ($updates[$resource][$method] as $update) {
      extract($update);
      $value = $major . '.' . $minor;
      $versions[$value] = $value;
    }
  }
  return $versions;
}