本文整理汇总了PHP中Environment::get_value方法的典型用法代码示例。如果您正苦于以下问题:PHP Environment::get_value方法的具体用法?PHP Environment::get_value怎么用?PHP Environment::get_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Environment
的用法示例。
在下文中一共展示了Environment::get_value方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_access_realms
function get_access_realms() {
$levels = $this->get_access_levels();
$realms = array();
foreach ($levels as $level) {
if ($level->gmlevel >= Environment::get_value('min_gm_level', 'access')) {
if ($level->realmid == -1) {
$realms = Realm::find()->available()->all();
break;
} else {
$realms = Realms::find()->where(array('realmid' => $level->realmid))->first();
}
}
}
return $realms;
}
示例2: get_dumpfile_path
public function get_dumpfile_path($realmid, $guid, $backup=false){
try {
$dumpdir = Environment::get_value('dump_dir');
if(substr($dumpdir, strlen($dumpdir), 1) != '/') $dumpdir .= '/';
} catch(Exception $e) {
$this->errors[] = $e->getMessage();
return false;
}
$filenameparts = array(
$realmid,
$guid,
'tcdump.sql'
);
$path = $dumpdir;
if($backup) $path .= 'backup/' . time() . '_';
$this->last_dumpfile_name = join('_', $filenameparts);
return $path . $this->last_dumpfile_name;
}
示例3: setUp
function setUp() {
$config = Environment::get_value('soap');
$config['host'] = '127.0.0.1';
$this->client = new TrinitySoapClient($config);
$this->client->connect();
}