interface RestWSResourceControllerInterface in RESTful Web Services 7.2
Same name and namespace in other branches
- 7 restws.entity.inc \RestWSResourceControllerInterface
Specifies CRUD and access methods for resources.
Hierarchy
- interface \RestWSResourceControllerInterface
Expanded class hierarchy of RestWSResourceControllerInterface
All classes that implement RestWSResourceControllerInterface
File
- ./
restws.entity.inc, line 11 - RESTful web services module integration for entities.
View source
interface RestWSResourceControllerInterface {
/**
* Returns the property info for the given resource.
*
* @return array
* An array structured as hook_entity_property_info() is structured for an
* entity type.
*/
public function propertyInfo();
/**
* Returns a metadata wrapper for the resource with the given id.
*
* @return EntityStructureWrapper
* Metadata wrapper of the resource.
*/
public function wrapper($id);
/**
* Create a new resource.
*
* @param array $values
* Array of values for properties of the resource, keyed by property
* name. At least for all required properties values have to be given.
*
* @return int|string
* The id of the newly created resource.
*/
public function create(array $values);
/**
* Returns an existing resource.
*
* @param int|string $id
* The id of the resource that should be returned.
*
* @return
* The internal representation of the resource.
*/
public function read($id);
/**
* Update an existing resource.
*
* @param int|string $id
* The id of the resource that should be updated.
* @param array $values
* An array of values for the properties to be updated, keyed by property
* name.
*/
public function update($id, array $values);
/**
* Delete an existing resource.
*
* @param int|string $id
* The id of the resource that should be deleted.
*/
public function delete($id);
/**
* Determines access for a given operation and resource.
*
* @param string $op
* Either 'create', 'view' (= read), 'update' or 'delete'.
* @param int|string $id
* The id of the resource.
*
* @see entity_access()
*/
public function access($op, $id);
/**
* Returns the name of the resource.
*/
public function resource();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RestWSResourceControllerInterface:: |
public | function | Determines access for a given operation and resource. | 2 |
RestWSResourceControllerInterface:: |
public | function | Create a new resource. | 2 |
RestWSResourceControllerInterface:: |
public | function | Delete an existing resource. | 2 |
RestWSResourceControllerInterface:: |
public | function | Returns the property info for the given resource. | 2 |
RestWSResourceControllerInterface:: |
public | function | Returns an existing resource. | 2 |
RestWSResourceControllerInterface:: |
public | function | Returns the name of the resource. | 2 |
RestWSResourceControllerInterface:: |
public | function | Update an existing resource. | 2 |
RestWSResourceControllerInterface:: |
public | function | Returns a metadata wrapper for the resource with the given id. | 2 |