本文整理汇总了PHP中eZINI::parameterSet方法的典型用法代码示例。如果您正苦于以下问题:PHP eZINI::parameterSet方法的具体用法?PHP eZINI::parameterSet怎么用?PHP eZINI::parameterSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZINI
的用法示例。
在下文中一共展示了eZINI::parameterSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: objectAttributeContent
function objectAttributeContent($contentObjectAttribute)
{
$contentClassAttribute = $contentObjectAttribute->attribute('contentclass_attribute');
$section = $contentClassAttribute->attribute(self::CLASS_SECTION_FIELD);
$parameter = $contentClassAttribute->attribute(self::CLASS_PARAMETER_FIELD);
$iniInstanceArray = explode(';', $contentClassAttribute->attribute(self::CLASS_INI_INSTANCE_FIELD));
$siteAccessArray = explode(';', $contentClassAttribute->attribute(self::SITE_ACCESS_LIST_FIELD));
$filename = $contentClassAttribute->attribute(self::CLASS_FILE_FIELD);
$modified = array();
$contentObject = $contentObjectAttribute->attribute('object');
foreach ($iniInstanceArray as $iniInstance) {
if ($iniInstance == 0) {
$path = 'settings/override';
} else {
$path = 'settings/siteaccess/' . $siteAccessArray[$iniInstance];
}
if (!eZINI::parameterSet($filename, $path, $section, $parameter)) {
continue;
}
$config = eZINI::instance($filename, $path, null, null, null, true);
if (is_array($config->variable($section, $parameter))) {
$objectIniArray = array();
eZIniSettingType::parseArrayInput($contentObjectAttribute->attribute('data_text'), $objectIniArray);
$existingIniArray = $config->variable($section, $parameter);
foreach (array_keys($existingIniArray) as $key) {
if (!is_int($key) && $existingIniArray[$key] != $objectIniArray[$key]) {
$modified[] = array('ini_value' => $parameter . '[' . $key . ']=' . $existingIniArray[$key], 'file' => $path . '/' . $filename);
}
}
} else {
if ($config->variable($section, $parameter) != $contentObjectAttribute->attribute('data_text')) {
$modified[] = array('ini_value' => $parameter . '=' . $config->variable($section, $parameter), 'file' => $path . '/' . $filename);
}
}
}
$data = array('data' => $contentObjectAttribute->attribute('data_text'), 'modified' => $modified);
return $data;
}