You are here

public function RestWSBaseFormat::updateResource in RESTful Web Services 7

Same name and namespace in other branches
  1. 7.2 restws.formats.inc \RestWSBaseFormat::updateResource()

Updates a resource.

Overrides RestWSFormatInterface::updateResource

1 method overrides RestWSBaseFormat::updateResource()
RestWSFormatRDF::updateResource in ./restws.formats.inc
Updates a resource.

File

./restws.formats.inc, line 112
RESTful web services module formats.

Class

RestWSBaseFormat
A base for all simple formats that are just serializing/unserializing an array of property values.

Code

public function updateResource($resourceController, $id, $data) {
  $values = $this
    ->unserialize($data);
  $resourceController
    ->update($id, $values);

  // Return an empty representation.
  return $this
    ->serialize(array());
}