本文整理汇总了PHP中eZINI::exists方法的典型用法代码示例。如果您正苦于以下问题:PHP eZINI::exists方法的具体用法?PHP eZINI::exists怎么用?PHP eZINI::exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZINI
的用法示例。
在下文中一共展示了eZINI::exists方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parameterSet
/**
* Check whether a specified parameter in a specified section is set in a specified file
*
* @deprecated Since 4.4
* @param string fileName file name (optional)
* @param string rootDir directory (optional)
* @param string section section name
* @param string parameter parameter name
* @return bool True if the the parameter is set.
*/
static function parameterSet($fileName = 'site.ini', $rootDir = 'settings', &$section, &$parameter)
{
if (!eZINI::exists($fileName, $rootDir)) {
return false;
}
$iniInstance = eZINI::instance($fileName, $rootDir, null, null, null, true);
return $iniInstance->hasVariable($section, $parameter);
}
示例2: languageFile
function languageFile($withVariation = false)
{
$type = $withVariation ? 'variation' : 'default';
if (!$this->LanguageINI[$type] instanceof eZINI) {
$language = $this->languageCode();
$countryVariation = $this->countryVariation();
$locale = $language;
if ($withVariation) {
if ($countryVariation !== '') {
$locale .= '@' . $countryVariation;
}
}
$languageFile = 'language/' . $locale . '.ini';
if (eZLocale::isDebugEnabled()) {
eZDebug::writeNotice("Requesting {$languageFile}", __METHOD__);
}
if (eZINI::exists($languageFile, 'share/locale')) {
$this->LanguageINI[$type] = eZINI::instance($languageFile, 'share/locale');
}
}
return $this->LanguageINI[$type];
}
示例3: array
$script->startup();
$options = $script->getOptions( '[clusterIdentifier:]', '', array(
'clusterIdentifier' => 'Cluster\' identifier (ie : cluster_france)'
) );
$script->initialize();
if ( !isset( $options['clusterIdentifier'] ) )
{
$script->shutdown( 1, 'clusterIdentifier must be specified' );
}
$clusterIdentifier = $options['clusterIdentifier'];
if ( !eZINI::exists( 'site.ini', "extension/{$clusterIdentifier}/settings" ) )
{
$script->shutdown( 1, "Cluster {$clusterIdentifier} hasn't been correctly initialized. Script will shutdown now." );
}
$language = eZINI::instance( 'site.ini', "extension/{$clusterIdentifier}/settings", null, false, false, true )->variable( 'RegionalSettings', 'SiteLanguageList' );
$language = $language[0];
$user = eZUser::fetchByName( 'admin' );
$userID = $user->attribute( 'contentobject_id' );
eZUser::setCurrentlyLoggedInUser( $user, $userID );
$cli = new QuestionInteractiveCli();
$country = eZContentObject::fetchByRemoteID( 'country_' . $clusterIdentifier );