provision.api.php 2.14 KB
Newer Older
drumm's avatar
drumm committed
1 2 3 4 5 6 7 8 9 10 11 12
<?php

/**
 * @file Provision API
 *
 * @see drush.api.php
 * @see drush_command_invoke_all
 */


/**
 * Advertise what service types are available and their default
13
 * implementations. Services are class Provision_Service_{type}_{service} in
drumm's avatar
drumm committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
 * {type}/{service}/{service}_service.inc files.
 *
 * @return
 *   An associative array of type => default. Default may be NULL.
 *
 * @see provision.service.inc
 */
function drush_hook_provision_services() {
  return array('db' => NULL);
}

/**
 * Append PHP code to Drupal's settings.php file.
 * 
 * To use templating, return an include statement for the template.
 *
 * @param $uri
 *   URI for the site.
 * @param $data
33
 *   Associative array of data from Provision_Config_Drupal_Settings::data.
drumm's avatar
drumm committed
34 35 36 37
 *
 * @return
 *   Lines to add to the site's settings.php file.
 *
38
 * @see Provision_Config_Drupal_Settings
drumm's avatar
drumm committed
39 40 41 42 43 44 45 46 47 48 49
 */
function drush_hook_provision_drupal_config($uri, $data) {
  return '$conf[\'reverse_proxy\'] = TRUE;';
}

/**
 * Append Apache configuration to server configuration.
 * 
 * To use templating, return an include statement for the template.
 *
 * @param $data
50
 *   Associative array of data from Provision_Config_Apache_Server::data.
drumm's avatar
drumm committed
51 52 53 54
 *
 * @return
 *   Lines to add to the configuration file.
 *
55
 * @see Provision_Config_Apache_Server
drumm's avatar
drumm committed
56 57 58 59 60 61 62 63 64 65
 */
function drush_hook_provision_apache_server_config($data) {
}

/**
 * Append Apache configuration to platform configuration.
 * 
 * To use templating, return an include statement for the template.
 *
 * @param $data
66
 *   Associative array of data from ProvisionConfig_Apache_Platform::data.
drumm's avatar
drumm committed
67 68 69 70
 *
 * @return
 *   Lines to add to the configuration file.
 *
71
 * @see ProvisionConfig_Apache_Platform
drumm's avatar
drumm committed
72 73 74 75 76 77 78 79 80 81 82 83
 */
function drush_hook_provision_apache_dir_config($data) {
}

/**
 * Append Apache configuration to site vhost configuration.
 * 
 * To use templating, return an include statement for the template.
 *
 * @param $uri
 *   URI for the site.
 * @param $data
84
 *   Associative array of data from Provision_Config_Apache_Site::data.
drumm's avatar
drumm committed
85 86 87 88
 *
 * @return
 *   Lines to add to the configuration file.
 *
89
 * @see Provision_Config_Apache_Site
drumm's avatar
drumm committed
90 91 92
 */
function drush_hook_provision_apache_vhost_config($uri, $data) {
}