This project is not covered by Drupal’s security advisory policy.
This is a library module. It provides no out of the box functionality other then providing a single point of contact to the ODataProducer library.
Requirements
The ODataProducer module requires the following libraries and modules:
The module requires PHP 5.3 or higher to be installed because the third party ODataProducer library uses namespaces.
Installation
In order for the ODataProducer module to work you need to perform the following steps before installing:
- Download and install the Libraries 2.x module.
- Download the ODataProducer library.
- Copy the folder
library/ODataProducerfrom the download in step 2 tosites/all/libraries. The ODataProducer library in Drupal should now be located atsites/all/libraries/ODataProducer. - Enable the ODataProducer module.
Documentation
Visit OData and ODataProducer library for more information about OData and how the library should be used.
Example usage
In this example we will create an entity ODataProducer module named entity_odata. Please note that this is simply a dummy module to illustrate how to access the ODataProducer library.
The entity_odata.info file will contain the following:
name = Entity OData
description = Provides ODataProducer integration for entities.
package = OData
core = 7.x
; Module dependencies:
dependencies[] = odataproducer
; Classes defined by the Entity OData module:
files[] = lib/EntityODataService.inc
Next we will create an empty entity_odata.module module file:
<?php
/**
* @file
* Defines the hooks and custom API functions for the Entity OData module.
*/
// Custom implementation...
Now for the ODataProducer library integration part. Create the file lib/EntityODataService.inc which will contain our DataService implementation. To access the ODataProducer library simply use the PHP use statement to include the classes you require.
<?php
// Include the required ODataProducer classes.
use ODataProducer\DataService;
use ODataProducer\IServiceProvider;
// Define our EntityODataService class.
class EntityODataService extends DataService implements IServiceProvider {
// Custom implementation...
}
?>
Project information
- Created by freblasty on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.