本文整理匯總了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;
}
示例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;
}