本文整理汇总了PHP中ConfigFile::ValuesArray方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigFile::ValuesArray方法的具体用法?PHP ConfigFile::ValuesArray怎么用?PHP ConfigFile::ValuesArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigFile
的用法示例。
在下文中一共展示了ConfigFile::ValuesArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fillDbLayers
public function fillDbLayers()
{
global $dbtypes;
$dbtypes = array();
$dbcfgfile = new ConfigFile(CONFIG_PATH . 'dblayers.cfg', TRUE);
$dbtypes = (array) $dbcfgfile->ValuesArray();
}
示例2: getIconsSet
public function getIconsSet()
{
$result = array();
$cfg_file = new ConfigFile(CONFIG_PATH . $this->mSetName . '.huiiconsset');
if ($cfg_file->Opened()) {
$values = $cfg_file->ValuesArray();
while (list($key, $val) = each($values)) {
$key = trim($key);
$val = trim($val);
if (substr_count($key, '.') == 2) {
$tmpkey = strtolower(substr($key, strpos($key, '.') + 1));
$type = substr($tmpkey, 0, strpos($tmpkey, '.'));
$realkey = substr($tmpkey, strpos($tmpkey, '.') + 1);
$result[$type][$realkey]['file'] = $val;
$result[$type][$realkey]['base'] = $this->mSetName;
}
}
} else {
import('com.solarix.ampoliros.io.log.Logger');
$log = new Logger(AMP_LOG);
$log->LogEvent('ampoliros.huithemes_library.huistyle_class.getstyle', 'Unable to open icons set file ' . CONFIG_PATH . $this->mSetName . '.huiiconsset', LOGGER_ERROR);
}
return $result;
}
示例3: getStyle
public function getStyle()
{
$result = array();
OpenLibrary('configman.library');
$cfg_file = new ConfigFile(CONFIG_PATH . $this->mStyleName . '.huistyle');
if ($cfg_file->Opened()) {
$values = $cfg_file->ValuesArray();
while (list($key, $val) = each($values)) {
$key = trim($key);
$val = trim($val);
$realkey = strtolower(substr($key, strpos($key, '.') + 1));
if ($realkey != 'name') {
$result[$realkey]['value'] = $val;
$result[$realkey]['base'] = $this->mStyleName;
}
}
} else {
import('com.solarix.ampoliros.io.log.Logger');
$log = new Logger(AMP_LOG);
$log->LogEvent('ampoliros.huithemes_library.huistyle_class.getstyle', 'Unable to open style file ' . CONFIG_PATH . $this->mStyleName . '.huistyle', LOGGER_ERROR);
}
return $result;
}