本文整理匯總了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;
}