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


PHP FreePBX::conf方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * This Preloads the default libraries into the class. There should be
  * very few of these, as they will normally get instantiated when
  * they're asked for the first time.
  * Currently this is only "Config".
  *
  * @return void
  * @access public
  */
 public function __construct(&$conf = null)
 {
     if (empty($conf)) {
         global $amp_conf;
         if (empty($amp_conf)) {
             throw new Exception("conf was empty!");
         }
         $conf = $amp_conf;
     }
     //TODO: load this another way
     global $astman;
     $libraries = $this->listDefaultLibraries();
     self::$conf = $conf;
     // Ensure the local object is available
     // but ensure this BEFORE we preload for any classes outside the scope of BMO
     self::$obj = $this;
     $oldIncludePath = get_include_path();
     set_include_path(__DIR__ . ":" . get_include_path());
     foreach ($libraries as $lib) {
         if (class_exists($lib)) {
             throw new Exception("Somehow, the class {$lib} already exists. Are you trying to 'new' something?");
         } else {
             include "{$lib}.class.php";
         }
         $class = '\\FreePBX\\' . $lib;
         $this->{$lib} = new $class($this);
     }
     set_include_path($oldIncludePath);
     $this->astman = $astman;
 }
开发者ID:powerpbx,项目名称:framework,代码行数:41,代码来源:FreePBX.class.php

示例2: __construct

 /**
  * Constructor
  *
  * This Preloads the default libraries into the class. There should be
  * very few of these, as they will normally get instantiated when
  * they're asked for the first time.
  * Currently this is only "Config".
  *
  * @return void
  * @access public
  */
 public function __construct(&$conf = null)
 {
     //TODO: load this another way
     global $astman;
     $libraries = $this->listDefaultLibraries();
     self::$conf = $conf;
     $oldIncludePath = get_include_path();
     set_include_path(__DIR__ . ":" . get_include_path());
     foreach ($libraries as $lib) {
         if (class_exists($lib)) {
             throw new Exception("Somehow, the class {$lib} already exists. Are you trying to 'new' something?");
         } else {
             include "{$lib}.class.php";
         }
         $this->{$lib} = new $lib($this);
     }
     set_include_path($oldIncludePath);
     $this->astman = $astman;
     // Ensure the local object is available
     self::$obj = $this;
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:32,代码来源:FreePBX.class.php


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