php Content Hub / Lift Factory Hook:pre-settings-php

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Content Hub / Lift Factory Hook:pre-settings-php相关的知识,希望对你有一定的参考价值。

<?php

/**
 * @file
 * Contains Environment variables.
 */
$ah_env = isset($_ENV['AH_SITE_ENVIRONMENT']) ? $_ENV['AH_SITE_ENVIRONMENT'] : NULL;
$ah_group = isset($_ENV['AH_SITE_GROUP']) ? $_ENV['AH_SITE_GROUP'] : NULL;
$is_ah_env = (bool) $ah_env;
$is_ah_prod_env = ($ah_env == 'prod' || $ah_env == '01live');
$is_ah_stage_env = ($ah_env == 'test' || $ah_env == '01test');
$is_ah_preview_env = ($ah_env == 'preview' || $ah_env == '01preview');
$is_ah_dev_cloud = (!empty($_SERVER['HTTP_HOST']) && strstr($_SERVER['HTTP_HOST'], 'devcloud'));
$is_ah_dev_env = (preg_match('/^dev[0-9]*$/', $ah_env) || $ah_env == '01dev');
$is_acsf = (!empty($ah_group) && file_exists("/mnt/files/$ah_group.$ah_env/files-private/sites.json"));
$acsf_db_name = $is_acsf ? $GLOBALS['gardens_site_settings']['conf']['acsf_db_name'] : NULL;
$is_local_env = !$is_ah_env;
$is_rse= (!empty($_SERVER['HTTP_HOST']) && strstr($_SERVER['HTTP_HOST'], 'readyseteat'));
$is_eggbeaters= (!empty($_SERVER['HTTP_HOST']) && strstr($_SERVER['HTTP_HOST'], 'eggbeaters'));


/**
 * @file
 * Contains Acquia Lift and Content Hub configuration.
 */
if ($is_ah_env && $is_rse) {
  switch ($ah_env) {
    case '01live':
      $config['acquia_lift.settings']['credential']['account_id'] = 'CONAGRA';
      $config['acquia_lift.settings']['credential']['site_id'] = 'readyseteat';
      $config['acquia_lift.settings']['credential']['content_origin'] = '1c98ab71-96bb-43cf-4909-81b7f4fbc868';
      $config['acquia_contenthub.admin_settings']['api_key'] = 'QNtZnZmDTAoTHjltwrKg';
      $config['acquia_contenthub.admin_settings']['secret_key'] = '84ph2qauL4PMp9WmlPnqFE9hSC5lHJ6lHJmiR7I1';
      $config['acquia_contenthub.admin_settings']['client_name'] = 'readyseteat_prod';
      $config['acquia_contenthub.admin_settings']['origin'] = '1c98ab71-96bb-43cf-4909-81b7f4fbc868';
      $config['acquia_contenthub.admin_settings']['shared_secret'] = 'ZzQuz1YbDidmey/lIspzYTo0Chhb7rwoRrsZNhEIsSE=';
      break;
    case '01test':
// put test creds in once generated
      break;
    case '01dev':
// put dev creds in once generated
      break;
  }
}

if ($is_ah_env && $is_eggbeaters) {
  switch ($ah_env) {
    case '01live':
      $config['acquia_lift.settings']['credential']['account_id'] = 'CONAGRA';
      $config['acquia_lift.settings']['credential']['site_id'] = 'eggbeaters';
      $config['acquia_lift.settings']['credential']['content_origin'] = '76806fc2-6a89-48d0-4639-f15cc5fbda8f';
      $config['acquia_contenthub.admin_settings']['api_key'] = 'QNtZnZmDTAoTHjltwrKg';
      $config['acquia_contenthub.admin_settings']['secret_key'] = '84ph2qauL4PMp9WmlPnqFE9hSC5lHJ6lHJmiR7I1';
      $config['acquia_contenthub.admin_settings']['client_name'] = 'eggbeaters';
      $config['acquia_contenthub.admin_settings']['origin'] = '76806fc2-6a89-48d0-4639-f15cc5fbda8f';
      $config['acquia_contenthub.admin_settings']['shared_secret'] = 'ZzQuz1YbDidmey/lIspzYTo0Chhb7rwoRrsZNhEIsSE=';
      break;
    case '01test':
// put test creds in once generated
      break;
    case '01dev':
// put dev creds in once generated
      break;
  }
}




if ($is_local_env) {
  $config['acquia_lift.settings']['credential']['customer_site'] = 'local';
  $config['acquia_contenthub.admin_settings']['origin'] = 'Not connected';
}

以上是关于php Content Hub / Lift Factory Hook:pre-settings-php的主要内容,如果未能解决你的问题,请参考以下文章

奇怪的电梯(lift)

hdu-1548 A strange lift---BFS

您能否为使用 Scala 的 Lift 框架制作的 webapp 推荐一个好的共享托管服务提供商? [关闭]

使用scala 2.8的maven和lift:lift-mapper丢失?

R语言使用yardstick包的lift_curve函数评估二分类(binary)模型的性能并使用autoplot函数可视化模型的提升(lift)曲线(lift curve)

php中判断字符串是否全是中文或含有中文的实现代码