function hosting_example_hosting_service

7.x-3.x hosting_example.module hosting_example_hosting_service()

Expose a service implementation to the service API.

Return a service implementation, such as the "apache" implementation of the "http" service.

An implementation class should go in {module name} and be must be named hostingService_{service type}_{type}, which should be a subclass of hostingService_{service type} or hostingService.

You will then need to either extend the existing {module name} file, or create a new file, containing the implementation of your service.

Return value

An associative array with the service implementation as key, and the service type implemented as value.

See also


Related topics


example/hosting_example.module, line 74
Example of the Hosting Services API.


function hosting_example_hosting_service() {
  return array('basic' => 'example'); // Service implementation => service type.