本文整理汇总了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;
}