本文整理汇总了PHP中ConfigFile::getValue方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigFile::getValue方法的具体用法?PHP ConfigFile::getValue怎么用?PHP ConfigFile::getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigFile
的用法示例。
在下文中一共展示了ConfigFile::getValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _validate
/**
* Runs validation for all registered forms
*
* @return void
*/
private function _validate()
{
if ($this->_isValidated) {
return;
}
$paths = array();
$values = array();
foreach ($this->_forms as $form) {
/* @var $form Form */
$paths[] = $form->name;
// collect values and paths
foreach ($form->fields as $path) {
$work_path = array_search($path, $this->_systemPaths);
$values[$path] = $this->_configFile->getValue($work_path);
$paths[] = $path;
}
}
// run validation
$errors = PMA_Validator::validate($this->_configFile, $paths, $values, false);
// change error keys from canonical paths to work paths
if (is_array($errors) && count($errors) > 0) {
$this->_errors = array();
foreach ($errors as $path => $error_list) {
$work_path = array_search($path, $this->_systemPaths);
// field error
if (!$work_path) {
// form error, fix path
$work_path = $path;
}
$this->_errors[$work_path] = $error_list;
}
}
$this->_isValidated = true;
}