You are here

function hosting_example_hosting_service in Hostmaster (Aegir) 6

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}.service.inc 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}.service.inc 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

hosting_server_services()

Related topics

File

modules/hosting/example/hosting_example.module, line 75
Example of the Hosting Services API.

Code

function hosting_example_hosting_service() {
  return array(
    'basic' => 'example',
  );

  // Service implementation => service type.
}