当前位置: 首页>>代码示例>>PHP>>正文


PHP Horde_Registry::isTest方法代码示例

本文整理汇总了PHP中Horde_Registry::isTest方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde_Registry::isTest方法的具体用法?PHP Horde_Registry::isTest怎么用?PHP Horde_Registry::isTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Horde_Registry的用法示例。


在下文中一共展示了Horde_Registry::isTest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor.
  *
  * @param Horde_Registry $reg_ob  Registry object.
  *
  * @throws Horde_Exception
  */
 public function __construct($reg_ob)
 {
     /* Read the registry configuration files. */
     if (!file_exists(HORDE_BASE . '/config/registry.php')) {
         throw new Horde_Exception('Missing registry.php configuration file');
     }
     /* Set textdomain to Horde, so that we really only load translations
      * from Horde. */
     $app = $reg_ob->getApp();
     if ($app != 'horde') {
         textdomain('horde');
     }
     require HORDE_BASE . '/config/registry.php';
     if ($files = glob(HORDE_BASE . '/config/registry.d/*.php')) {
         foreach ($files as $r) {
             include $r;
         }
     }
     if (file_exists(HORDE_BASE . '/config/registry.local.php')) {
         include HORDE_BASE . '/config/registry.local.php';
     }
     if ($reg_ob->vhost) {
         include $reg_ob->vhost;
     }
     /* Reset textdomain. */
     if ($app != 'horde') {
         textdomain($app);
     }
     if (!isset($this->applications['horde']['fileroot'])) {
         $this->applications['horde']['fileroot'] = isset($app_fileroot) ? $app_fileroot : HORDE_BASE;
     }
     if (!isset($app_fileroot)) {
         $app_fileroot = $this->applications['horde']['fileroot'];
     }
     /* Make sure the fileroot of Horde has a trailing slash to not trigger
      * open_basedir restrictions that have that trailing slash too. */
     $app_fileroot = rtrim($app_fileroot, '/') . '/';
     if (!isset($this->applications['horde']['webroot'])) {
         $this->applications['horde']['webroot'] = isset($app_webroot) ? $app_webroot : $this->_detectWebroot();
     }
     if (!isset($app_webroot)) {
         $app_webroot = $this->applications['horde']['webroot'];
     }
     if (!isset($this->applications['horde']['staticfs'])) {
         $this->applications['horde']['staticfs'] = $this->applications['horde']['fileroot'] . '/static';
     }
     if (!isset($this->applications['horde']['staticuri'])) {
         $this->applications['horde']['staticuri'] = $this->applications['horde']['webroot'] . '/static';
     }
     /* Scan for all APIs provided by each app, and set other common
      * defaults like templates and graphics. */
     foreach ($this->applications as $appName => &$app) {
         if (!isset($app['status'])) {
             $app['status'] = 'active';
         } elseif ($app['status'] == 'heading' || $app['status'] == 'topbar' || $app['status'] == 'link') {
             continue;
         }
         $app['fileroot'] = isset($app['fileroot']) ? rtrim($app['fileroot'], ' /') : $app_fileroot . $appName;
         if (!isset($app['name'])) {
             $app['name'] = '';
         }
         if (!file_exists($app['fileroot']) || !$reg_ob->isTest() && file_exists($app['fileroot'] . '/config/conf.xml') && !file_exists($app['fileroot'] . '/config/conf.php')) {
             $app['status'] = 'inactive';
             Horde::log('Setting ' . $appName . ' inactive because the fileroot does not exist or the application is not configured yet.', 'DEBUG');
         }
         $app['webroot'] = isset($app['webroot']) ? rtrim($app['webroot'], ' /') : $app_webroot . '/' . $appName;
         if ($app['status'] != 'inactive' && isset($app['provides']) && ($app['status'] != 'admin' || $reg_ob->isAdmin())) {
             if (is_array($app['provides'])) {
                 foreach ($app['provides'] as $interface) {
                     $this->interfaces[$interface] = $appName;
                 }
             } else {
                 $this->interfaces[$app['provides']] = $appName;
             }
         }
         if (!isset($app['templates']) && isset($app['fileroot'])) {
             $app['templates'] = $app['fileroot'] . '/templates';
         }
         if (!isset($app['jsuri']) && isset($app['webroot'])) {
             $app['jsuri'] = $app['webroot'] . '/js';
         }
         if (!isset($app['jsfs']) && isset($app['fileroot'])) {
             $app['jsfs'] = $app['fileroot'] . '/js';
         }
         if (!isset($app['themesuri']) && isset($app['webroot'])) {
             $app['themesuri'] = $app['webroot'] . '/themes';
         }
         if (!isset($app['themesfs']) && isset($app['fileroot'])) {
             $app['themesfs'] = $app['fileroot'] . '/themes';
         }
     }
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:99,代码来源:Registryconfig.php


注:本文中的Horde_Registry::isTest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。