當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。