provision.api.php 2.13 KB
Newer Older
drumm's avatar
drumm committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<?php

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


/**
 * Advertise what service types are available and their default
 * implementations. Services are class provisionService_{type}_{service} in
 * {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
mig5's avatar
mig5 committed
33
 *   Associative array of data from provisionConfig_drupal_settings::data.
drumm's avatar
drumm committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
 *
 * @return
 *   Lines to add to the site's settings.php file.
 *
 * @see provisionConfig_drupal_settings
 */
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
mig5's avatar
mig5 committed
50
 *   Associative array of data from provisionConfig_apache_server::data.
drumm's avatar
drumm committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
 *
 * @return
 *   Lines to add to the configuration file.
 *
 * @see provisionConfig_apache_server
 */
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
mig5's avatar
mig5 committed
66
 *   Associative array of data from provisionConfig_apache_platform::data.
drumm's avatar
drumm committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
 *
 * @return
 *   Lines to add to the configuration file.
 *
 * @see provisionConfig_apache_platform
 */
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
mig5's avatar
mig5 committed
84
 *   Associative array of data from provisionConfig_apache_site::data.
drumm's avatar
drumm committed
85 86 87 88 89 90 91 92
 *
 * @return
 *   Lines to add to the configuration file.
 *
 * @see provisionConfig_apache_site
 */
function drush_hook_provision_apache_vhost_config($uri, $data) {
}