eZ Publish  [trunk]
eZINI Class Reference

Reads and writes .ini style configuration files. More...

List of all members.

Public Member Functions

 appendOverrideDir ($dir, $globalDir=false, $identifier=false, $scope=null)
 Appends the override directory $dir to the override directory list.
 assign ($blockName, $varName, &$variable)
 eZINI ($fileName= 'site.ini', $rootDir= '', $useTextCodec=null, $useCache=null, $useLocalOverrides=null, $directAccess=false, $addArrayDefinition=false, $load=true)
 Initialization of eZINI object.
 filename ()
 findSettingPlacement ($path)
 Gives you the location of a ini file based on it's path, format is same as used internally for $identifer for override dirs- Eg: default / ext-siteaccess:<ext> / siteaccess / extension:<ext> / override.
 getNamedArray ()
group ($blockName)
groupPlacements ()
groups ()
 hasGroup ($blockName)
 hasSection ($sectionName)
 hasVariable ($blockName, $varName)
 isSettingReadOnly ($fileName=false, $blockName=false, $settingName=false)
 isVariableModified ($blockName, $varName)
 load ($reset=true)
 Tries to load the ini file specified in the constructor or instance() function.
 loadCache ($reset=true, $placement=false)
 Will load a cached version of the ini file if it exists, if not it will parse the original file and create the cache file.
 loadPlacement ($reset=true)
 Tries to load the ini file placement specified in the constructor or instance() function.
 overrideDirs ($scope=null)
 Return the override directories witch raw override dir data, or within a scope if $scope is set, see eZINI::defaultOverrideDirs() for how the raw data looks like.
 prependOverrideDir ($dir, $globalDir=false, $identifier=false, $scope=null)
 Prepends the override directory $dir to the override directory list.
 readOnlySettingsCheck ()
 removeGroup ($blockName)
 removeOverrideDir ($identifier, $scope= 'extension')
 Removes an override dir by identifier See eZINI::defaultOverrideDirs() for how these parameters are used.
 removeSetting ($blockName, $settingName)
 reset ()
 resetCache ()
 resetOverrideDirs ()
 Reset the override directories with data from eZINI::defaultOverrideDirs().
 rootDir ()
 save ($fileName=false, $suffix=false, $useOverride=false, $onlyModified=false, $useRootDir=true, $resetArrays=false, $encapsulateInPHP=true)
 setGroups ($groupArray)
 setOverrideDirs (array $newDirs, $scope=false)
 Set the override directories witch raw override dir data, or within a scope if $scope is set, see eZINI::defaultOverrideDirs() for how the raw data looks like.
 setReadOnlySettingsCheck ($readOnly=true)
 settingType ($settingValue)
 setVariable ($blockName, $variableName, $variableValue)
 setVariables ($variables)
 variable ($blockName, $varName)
 variableArray ($blockName, $varName)
 variableMulti ($blockName, $varNames, $signatures=array())

Static Public Member Functions

static create ($fileName= 'site.ini', $rootDir= 'settings', $useTextCodec=null, $useCache=null, $useLocalOverrides=null)
static defaultOverrideDirs ()
 Default override directories as raw array data.
static exists ($fileName="site.ini", $rootDir="settings")
static fetchFromFile ($fileName, $useTextCodec=null)
static getSiteAccessIni ($siteAccess, $iniFile)
 Get ini file for a specific siteaccess (not incl extesnions or overrides) use eZSiteAccess::getIni() instead if you want to have full ini env.
static globalOverrideDirs ($scope=null)
 Return the global override directories witch raw override dir data, or within a scope if $scope is set, see eZINI::defaultOverrideDirs() for how the raw data looks like.
static instance ($fileName= 'site.ini', $rootDir= 'settings', $useTextCodec=null, $useCache=null, $useLocalOverrides=null, $directAccess=false, $addArrayDefinition=false)
 Returns a shared instance of the eZINI class pr $fileName, $rootDir and $useLocalOverrides param combinations.
static isCacheEnabled ()
 Returns whether INI cache is enabled globally, by default it is true.
static isDebugEnabled ()
 Returns whether debugging of internals is enabled.
static isLoaded ($fileName= 'site.ini', $rootDir= 'settings', $useLocalOverrides=null)
 Returns whether the mentioned ini file has been loaded.
static isNoCacheAdviced ()
static isTextCodecEnabled ()
 Returns whether textcodecs is to be used, this will use the eZTextCodec class in the eZI18N library for text conversion.
static parameterSet ($fileName= 'site.ini', $rootDir= 'settings', &$section, &$parameter)
 Check whether a specified parameter in a specified section is set in a specified file.
static resetAllGlobals ($resetGlobalOverrideDirs=true)
 Reset all eZINI instances as well override dirs ( optional )
static resetAllInstances ($resetGlobalOverrideDirs=true)
 Reset all eZINI instances as well override dirs ( optional )
static resetGlobalOverrideDirs ()
 Reset the global override directories with data from eZINI::defaultOverrideDirs().
static resetGlobals ($fileName= 'site.ini', $rootDir= 'settings', $useLocalOverrides=null)
 Resets a specific instance of eZINI.
static resetInstance ($fileName= 'site.ini', $rootDir= 'settings', $useLocalOverrides=null)
 Resets a specific instance of eZINI.
static setIsCacheEnabled ($enabled)
 Sets whether caching is enabled for INI files or not.
static setIsDebugEnabled ($enabled)
 Sets whether internal debugging is enabled or not.
static setIsTextCodecEnabled ($enabled)
 Sets whether textcodec conversion is enabled or not.

Public Attributes

 $AddArrayDefinition
 If true empty element will be created in the beginning of array if it is defined in this ini file.
 $BlockValues
 Variable to store the ini file values.
 $BlockValuesPlacement
 Variable to store the setting placement (which file is the setting in).
 $CacheFile
 Stores the path and filename of the value cache file.
 $Charset
 The charset of the ini file.
 $Codec
 Variable to store the textcodec.
 $DirectAccess
 If true then all file loads are done directly on the filename.
 $FileName
 Stores the filename.
 $LocalOverrideDirArray
 Contains the override dirs, if in local mode.
 $ModifiedBlockValues
 Variable to store whether variables are modified or not.
 $PlacementCacheFile
 Stores the path and filename of the placement cache file.
 $ReadOnlySettingsCheck = true
 If true eZINI will check each setting (before saving) for correspondence of settings in site.ini[eZINISetting].ReadonlySettingList.
 $RootDir
 The root of all ini files.
 $UseCache
 true if cache should be used
 $UseLocalOverrides
 true if the overrides should only be changed locally
 $UseTextCodec
 Whether to use the text codec when reading the ini file or not.
const CONFIG_CACHE_DIR = 'var/cache/ini/'
const CONFIG_CACHE_REV = 2

Protected Member Functions

 cacheFileName ($placement=false)
 saveCache ($cachedDir, $cachedFile, array $data, array $inputFiles, $iniFile)
 Stores the content of the INI object to the cache file $cachedFile.

Static Protected Member Functions

static overrideDirsByScope (array $dirs, $scope=null)
 Return the override directories witch raw override dir data, or within a scope if $scope is set, see eZINI::defaultOverrideDirs() for how the raw data looks like.
static selectOverrideScope ($scope, $identifier, $dir, $default)
 Function to handle bc with code from pre 4.4 that does not know about scopes.

Static Protected Attributes

static $cacheEnabled = true
static $checkFileMtime = null
static $debugEnabled = false
static $filePermission = null
static $GlobalOverrideDirArray = null
 Contains global override dirs.
static $instances = array()
static $textCodecEnabled = true

Private Member Functions

 findInputFiles (&$inputFiles, &$iniFile)
 parse ($inputFiles=false, $iniFile=false, $reset=true, $placement=false)
 parseFile ($file, $placement=false)

Detailed Description

Reads and writes .ini style configuration files.

The most common way of using it is.

  $ini = eZINI::instance( "site.ini" );

  // get a variable from the file.
  $iniVar = $ini->variable( "BlockName", "Variable" );

The default ini file is site.ini but others can be passed to the instance() function among with some others. It will create one unique instance for each ini file and rootdir, this means that the next time instance() is used with the same parameters the same object will be returned and no new parsing is required.

The class will by default try to create a cache file in var/cache/ini, however to change this behaviour the static setIsCacheEnabled() function can be used, or use the $useCache parameter in instance() for setting this for one object only.

The class will also handle charset conversion using eZTextCodec, to turn this behaviour off use the static setIsTextCodecEnabled() function or set the $useTextCodec parameter in instance() for a per object basis setting.

Normally the eZINI class will not give out much information about what it's doing, it's only when errors occur that you'll see this. To enable internal debugging use the static setIsDebugEnabled() function. The class will then give information about which files are load, if cache files are used and when cache files are written.

Definition at line 44 of file ezini.php.


Member Function Documentation

eZINI::appendOverrideDir ( dir,
globalDir = false,
identifier = false,
scope = null 
)

Appends the override directory $dir to the override directory list.

Appends override dir to 'override' scope if scope is not defined, meaning above anything else. See eZINI::defaultOverrideDirs() for how these parameters are used.

Parameters:
string$dir
bool$globalDir
string | false$identifierWill overwrite existing directory with same identifier if set
string | null$scope
Returns:
bool True if new dir was appended, false if there was a $identifier match and a overwrite

Definition at line 1251 of file ezini.php.

eZINI::assign ( blockName,
varName,
&$  variable 
)

Reads a variable from the ini file and puts it in the parameter $variable.

Note:
$variable is not modified if the variable does not exist

Definition at line 1318 of file ezini.php.

eZINI::cacheFileName ( placement = false) [protected]

Generates cache name for loadCache

Definition at line 433 of file ezini.php.

Referenced by loadCache().

static eZINI::create ( fileName = 'site.ini',
rootDir = 'settings',
useTextCodec = null,
useCache = null,
useLocalOverrides = null 
) [static]
static eZINI::defaultOverrideDirs ( ) [static]

Default override directories as raw array data.

Returns:
array An associated array of associated arrays of arrays.. First level keys are the scope and values are arrays Second level keys are identifier (numberic if not defined by caller) and value is arrays Third level contains (string) override dir, (bool) global flag if false then relative to $RootDir and (string|false) optional identifier as used by eZINI::prependOverrideDir() to match and replace values on.

Definition at line 1107 of file ezini.php.

Referenced by eZINI(), resetGlobalOverrideDirs(), and selectOverrideScope().

static eZINI::exists ( fileName = "site.ini",
rootDir = "settings" 
) [static]
Returns:
true if the INI file $fileName exists in the root dir $rootDir. $fileName defaults to site.ini and rootDir to settings.

Definition at line 298 of file ezini.php.

Referenced by eZLocale\countryFile(), eZLocale\languageFile(), eZLocale\localeFile(), and parameterSet().

eZINI::eZINI ( fileName = 'site.ini',
rootDir = '',
useTextCodec = null,
useCache = null,
useLocalOverrides = null,
directAccess = false,
addArrayDefinition = false,
load = true 
)

Initialization of eZINI object.

Enter description here ...

Parameters:
string$fileName
string$rootDir
null | bool$useTextCodec
null | bool$useCache
null | bool$useLocalOverrides
bool$directAccess
bool$addArrayDefinition
bool$load
Since:
4.5 Lets you disable automatic loading of ini values in cases where changes on instance will be done first.

Definition at line 120 of file ezini.php.

Referenced by create(), fetchFromFile(), and instance().

static eZINI::fetchFromFile ( fileName,
useTextCodec = null 
) [static]

Fetches the ini file $fileName and returns the INI object for it.

Note:
This will not use the override system or read cache files, this is a direct fetch from one file.

Definition at line 1696 of file ezini.php.

Referenced by getSiteAccessIni(), and eZFilePackageHandler\install().

Returns:
the filename.

Definition at line 178 of file ezini.php.

Referenced by setVariable().

eZINI::findInputFiles ( &$  inputFiles,
&$  iniFile 
) [private]

Looks trough all known settings and override folders to find relevant INI files. The result is a list with expanded paths to the files.

Returns:
the expanded file list.

Definition at line 355 of file ezini.php.

Referenced by loadCache(), and parse().

Gives you the location of a ini file based on it's path, format is same as used internally for $identifer for override dirs- Eg: default / ext-siteaccess:<ext> / siteaccess / extension:<ext> / override.

Parameters:
string$path
Returns:
string

Definition at line 1527 of file ezini.php.

Returns BlockValues, which is a nicely named Array

Definition at line 1640 of file ezini.php.

static eZINI::getSiteAccessIni ( siteAccess,
iniFile 
) [static]

Get ini file for a specific siteaccess (not incl extesnions or overrides) use eZSiteAccess::getIni() instead if you want to have full ini env.

Parameters:
string$siteAccess
string$iniFile
Returns:
eZINI

Definition at line 1709 of file ezini.php.

static eZINI::globalOverrideDirs ( scope = null) [static]

Return the global override directories witch raw override dir data, or within a scope if $scope is set, see eZINI::defaultOverrideDirs() for how the raw data looks like.

Parameters:
string | false | null$scopeSee eZINI::defaultOverrideDirs() for possible scope values If false then you'll get raw override dir structure, null (default) is a simplified variant withouth scopes that is easy to iterate over.
Returns:
array

Definition at line 1068 of file ezini.php.

& eZINI::group ( blockName)

Fetches a variable group and returns it as an associative array.

Definition at line 1444 of file ezini.php.

Fetches all defined placements for every setting and returns them as an associative array

Definition at line 1510 of file ezini.php.

Fetches all defined groups and returns them as an associative array

Definition at line 1502 of file ezini.php.

eZINI::hasGroup ( blockName)

Checks if group $blockName is set. Returns true if the group exists, false if not.

Definition at line 1436 of file ezini.php.

eZINI::hasSection ( sectionName)

Check if a block/section is set. Returns true if the section/block is set, false if not

Definition at line 1391 of file ezini.php.

eZINI::hasVariable ( blockName,
varName 
)

Checks if a variable is set. Returns true if the variable exists, false if not.

Definition at line 1383 of file ezini.php.

static eZINI::instance ( fileName = 'site.ini',
rootDir = 'settings',
useTextCodec = null,
useCache = null,
useLocalOverrides = null,
directAccess = false,
addArrayDefinition = false 
) [static]

Returns a shared instance of the eZINI class pr $fileName, $rootDir and $useLocalOverrides param combinations.

If $useLocalOverrides is set to true you will get a copy of the current overrides, but changes to the override settings will not be global. Direct access is for accessing the filename directly in the specified path. .append and .append.php is automaticly added to filename note: Use create() if you need to get a unique copy which you can alter.

Parameters:
string$fileName
string$rootDir
null | bool$useTextCodecDefault system setting if null (instance not used if not null!)
null | bool$useCacheDefault system setting if null (instance not used if not null!)
null | bool$useLocalOverridesDefault system setting if null
bool$directAccessDirect access to specific file instead of values from several (instance not used if true!)
bool$addArrayDefinition,\xrefitemdeprecated 116.
Returns:
eZINI

Definition at line 1676 of file ezini.php.

Referenced by eZDFSFileHandlerDFSBackend\__construct(), eZFS2FileHandler\__construct(), ezpRestAuthenticationStyle\__construct(), ezpMvcConfiguration\__construct(), eZDBFileHandler\__construct(), ezpRestDebug\__construct(), ezpRestMvcController\__construct(), eZDFSFileHandler\__construct(), eZStaticCache\__construct(), eZWebDAVContentBackend\__construct(), eZDFSFileHandlerMySQLBackend\_connect(), eZDBFileHandlerMysqlBackend\_connect(), eZDBFileHandlerMysqliBackend\_connect(), eZDFSFileHandlerMySQLiBackend\_connect(), eZModule\accessAllowed(), eZUser\accessArray(), eZExtension\activateExtensions(), eZExtension\activeExtensions(), eZModule\activeModuleRepositories(), eZInstallScriptPackageHandler\add(), eZExtensionPackageHandler\addExtension(), eZCodeTemplate\allCodeFiles(), eZInformationCollection\allowAnonymous(), eZMail\allowedCharsets(), eZNotificationEventType\allowedTypes(), eZWorkflowType\allowedTypes(), eZDataType\allowedTypes(), eZTemplateCompiler\alwaysGenerate(), eZImageAnalyzer\analyzerData(), eZWebDAVContentBackend\appendLogEntry(), eZContentCacheManager\appendRelatingNodeIDs(), eZPackage\applyStorageFilePermissions(), eZInformationCollection\attributeHideList(), eZContentObjectTreeNode\availableClassListJsArray(), eZNotificationEventFilter\availableHandlers(), eZWebDAVContentServer\availableSites(), eZExtension\baseDirectory(), eZDBInterface\begin(), eZContentBrowse\browse(), eZStaticCache\buildCacheDirPath(), eZSearchEngine\buildTempTablesForFullTextSearch(), eZTranslationCache\cacheDirectory(), eZURLWildcard\cacheInfo(), eZContentCache\cachePathInfo(), eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentClass\canInstantiateClassList(), eZContentFunctionCollection\canInstantiateClassList(), Cezpdf\Cezpdf(), eZSiteAccess\change(), changeDBCharsetORACLE(), eZImageHandler\changeFilePermissions(), changeSiteAccessSetting(), eZPaymentCallbackChecker\checkAmount(), eZSSLZone\checkModuleView(), eZTipafriendRequest\checkReceiver(), checkTimeout(), eZContentObjectTreeNode\childrenByName(), eZUserType\classAttributeRemovableInformation(), eZDataType\classDisplayInformation(), eZContentClassPackageHandler\classDOMTree(), eZTipafriendRequest\cleanup(), eZContentCache\cleanup(), eZSubtreeCache\cleanupCacheDir(), eZBasket\cleanupCurrentBasket(), eZContentCacheManager\clearAllContentCache(), eZContentCacheManager\clearObjectViewCache(), eZContentCacheManager\clearObjectViewCacheIfNeeded(), eZContentCacheManager\clearTemplateBlockCache(), eZContentCacheManager\clearTemplateBlockCacheIfNeeded(), eZDBInterface\commit(), eZTemplateCompiler\compilationDirectory(), eZTemplateCompiler\compilationFilename(), eZTemplateCompiler\compileTemplate(), eZContentClass\contentObjectName(), eZURLAliasML\convertToAlias(), eZFileHandler\copy(), eZVatRule\country(), eZExchangeRatesUpdateHandler\create(), eZPDFExport\create(), eZRSSExport\create(), eZDiffXMLTextEngine\createDifferenceObject(), eZContentObjectTreeNode\createExtendedAttributeFilterSQLStrings(), eZContentOperationCollection\createFeedForNode(), eZWebDAVContentServer\createFolder(), eZWebDAVContentBackend\createFolder(), eZImageShellHandler\createFromINI(), eZImageGDHandler\createFromINI(), eZContentObject\createGroupedDataMap(), ezpRestRouter\createRoutes(), eZOrder\customerList(), eZMultiOption2Type\customObjectAttributeHTTPAction(), eZObjectRelationType\customObjectAttributeHTTPAction(), eZObjectRelationListType\customObjectAttributeHTTPAction(), databaseCleanup(), eZWebDAVServer\dataCharset(), eZTemplateLocaleOperator\dateTimeTransformation(), eZSiteAccess\debugEnabled(), eZCodeMapper\decodeCommand(), eZContentObject\defaultLanguage(), eZWebDAVContentBackend\deleteContent(), eZContentOperationCollection\deleteObject(), eZContentCacheManager\dependencyInfo(), eZContentUpload\detectClassIdentifier(), eZContentUpload\detectLocations(), dfsCleanup(), eZDir\directoryPermission(), eZStepSiteTemplates\display(), eZStepSiteDetails\display(), eZInformationCollection\displayHandling(), ezpRestRouter\doCreateRoutes(), ezpRestOauthTokenController\doHandleRequest(), eZObjectRelationListType\domString(), eZMatrix\domString(), ezpOauthUtility\doRefreshToken(), ezpOauthUtility\doRefreshTokenWithAuthorizationCode(), eZStepSiteTypes\downloadFile(), eZVatType\dynamicVatTypeName(), eZHTTPHeader\enabled(), eZSSLZone\enabled(), eZDefaultConfirmOrderHandler\execute(), eZSimpleShippingType\execute(), ezpMultivariateTestHandler\execute(), eZStaticCache\executeActions(), eZFunctionHandler\executeAlias(), eZCodeMapper\executeCommandCode(), eZContentObjectEditHandler\executeHandlerFunction(), eZContentObject\expireTemplateBlockCacheIfNeeded(), eZISBN13\extractISBNNumber(), eZSiteAccess\extraDebugEnabled(), eZCheckUser(), eZCheckValidity(), eZCodeTemplate\eZCodeTemplate(), eZDBInterface\eZDBInterface(), eZDisplayDebug(), eZDisplayResult(), eZMail\eZMail(), eZPaymentCallbackChecker\eZPaymentCallbackChecker(), eZPDF\eZPDF(), eZPostgreSQLDB\eZPostgreSQLDB(), eZSetupConfigVariable(), eZSetupConfigVariableArray(), eZSetupCriticalTests(), eZSetupImageConfigVariableArray(), eZSetupOptionalTests(), eZSetupTestDirectoryPermissions(), eZSetupTestFilePermissions(), eZSimplifiedXMLInput\eZSimplifiedXMLInput(), eZStepInstaller\eZStepInstaller(), eZStepSiteTypes\eZStepSiteTypes(), eZTemplateImageOperator\eZTemplateImageOperator(), eZUpdateDebugSettings(), eZUpdateTextCodecSettings(), eZXHTMLXMLOutput\eZXHTMLXMLOutput(), eZXMLInputParser\eZXMLInputParser(), eZXMLOutputHandler\eZXMLOutputHandler(), eZAlphabetOperator\fetchAlphabet(), eZAudit\fetchAuditEnabled(), eZAudit\fetchAuditNameSettings(), eZCountryType\fetchCountryList(), eZCache\fetchList(), eZNavigationPart\fetchList(), eZTSTranslator\fetchList(), eZPackage\fetchMaintainerRoleIDList(), eZContentClass\fetchMatchGroupIDList(), eZContentObjectTreeNode\fetchNode(), eZWebDAVContentBackend\fetchNodeByTranslation(), eZWebDAVContentServer\fetchNodeInfo(), eZPackageType\fetchObjectAttributeHTTPInput(), eZUserType\fetchObjectAttributeHTTPInput(), eZClassFunctionCollection\fetchOverrideTemplateList(), eZWebDAVContentBackend\fetchParentNodeByTranslation(), eZProductCategory\fetchProductCountByCategory(), eZRSSExport\fetchRSS1_0(), eZRSSExport\fetchRSS2_0(), eZLayoutFunctionCollection\fetchSitedesignList(), eZTemplateExecuteOperator\fetchTransform(), eZRSSImport\fieldMap(), eZFilePackageHandler\fileExists(), eZFSFileHandler\fileStoreContents(), ezpRestAuthConfiguration\filter(), eZExtension\findExtensionType(), eZContentUpload\findHandler(), eZSiteAccess\findPathToSiteAccess(), eZURLAliasML\findUniqueText(), eZCodeMapper\generateCommandCode(), eZRSSExport\generateFeed(), eZContentObjectPackageHandler\generateFetchAliasArray(), eZContentCacheManager\generateObjectViewCache(), eZContentObjectPackageHandler\generateOverrideSettingsArray(), eZNodeviewfunctions\generateViewCacheFile(), ezpRestRequest\getBaseURI(), ezpRestRouter\getCachedRoutes(), eZSearch\getEngine(), getExtensionsInfo(), ezpMobileDeviceDetectFilter\getFilter(), ezpMultivariateTest\getHandler(), eZExtension\getHandlerClass(), eZSession\getHandlerInstance(), eZSiteAccess\getIni(), ezpAttributeOperatorManager\getOutputFormatter(), eZDir\getPathFromFilename(), eZDefaultVATHandler\getProductCategory(), ezpRestIniRouteFilter\getSkipRoutes(), eZSSLZone\getSSLZones(), eZVATManager\getUserCountryAttributeName(), eZWebDAVContentBackend\getVirtualFolderCollection(), eZUser\groups(), eZGeneralDigestHandler\handle(), eZContentUpload\handleLocalFile(), eZContentObjectPackageHandler\handleParameters(), eZSubTreeHandler\handlePublishEvent(), handleRelationTemplate(), eZContentUpload\handleUpload(), eZImageInterface\hasGD2(), eZHTTPHeader\headerOverrideArray(), eZi18nOperator\i18nTrans(), eZImageAliasHandler\imagePath(), eZImageAliasHandler\imagePathByNode(), eZContentCache\inCleanupThresholdRange(), eZCollaborationItemHandler\ini(), eZStepCreateSites\init(), eZStepDatabaseInit\init(), eZPDFTable\initFrameMargins(), eZXHTMLXMLOutput\initHandlerEmbed(), ezpContentPublishingQueue\initHooks(), eZECBHandler\initialize(), eZContentObjectEditHandler\initialize(), eZModule\initialize(), eZSimpleTagsOperator\initializeIncludes(), eZIniSettingType\initializeObjectAttribute(), eZStepCreateSites\initializePackage(), eZURLOperator\iniTrans(), eZINIAddonPackageHandler\install(), eZExtensionPackageHandler\install(), eZContentObjectPackageHandler\installFetchAliases(), eZContentObjectPackageHandler\installOverrides(), eZContentObjectPackageHandler\installTemplates(), eZTemplateTreeCache\internalKey(), eZTemplateCompiler\isAccumulatorsEnabled(), eZTemplateTreeCache\isCacheEnabled(), eZTemplateCompiler\isCommentsEnabled(), eZTemplateCompiler\isCompilationEnabled(), eZContentObject\isComplexViewMode(), eZDebugSetting\isConditionTrue(), ezpRestDebug\isDebugEnabled(), eZTemplateCompiler\isDevelopmentModeEnabled(), ezpMultivariateTestHandler\isEnabled(), ezpMobileDeviceDetect\isEnabled(), ezpI18n\isEnabled(), eZTemplateCompiler\isExecutionEnabled(), isExtensionSiteaccess(), eZTemplateCompiler\isFallbackResourceCodeEnabled(), eZSSLZone\isKeepModeView(), ezpLanguageSwitcher\isLocaleAvailableAsFallback(), eZWebDAVServer\isLoggingEnabled(), eZTemplateCompiler\isNodePlacementEnabled(), eZWebDAVContentServer\isObjectFolder(), eZContentObject\isObjectRelationTyped(), ezpAttributeOperatorManager\isRegisteredFormatter(), isSettingReadOnly(), eZTemplateCompiler\isTimingPointsEnabled(), eZTemplateCompiler\isTreeEnabled(), ezpLanguageSwitcher\isUrlPointingToModule(), eZVATManager\isUserCountryRequired(), ezpRestDbConfig\lazyDbHelper(), eZUser\limitValueList(), eZMail\lineSeparator(), eZLintSchema\lintCheckSchema(), eZPaymentGatewayType\loadAndRegisterBuiltInGateways(), eZPaymentGatewayType\loadAndRegisterExtensionGateways(), eZNotificationEventType\loadAndRegisterType(), eZWorkflowType\loadAndRegisterType(), eZDataType\loadAndRegisterType(), eZShippingManager\loadBasketInfoHandler(), eZNotificationEventFilter\loadHandler(), eZDBSchemaInterface\loadSchemaTransformationRules(), eZShippingManager\loadShippingHandler(), eZCodeMapper\loadTransformationFiles(), eZTSTranslator\loadTranslationFile(), eZVATManager\loadVATHandler(), eZPackage\maintainerRoleListForRoles(), eZSiteAccess\match(), eZContentObject\matchIngroupIDList(), eZContentBrowseRecent\maximumRecentItems(), eZRunCronjobs\maxScriptExecutionTime(), eZBinaryFile\metaData(), ezpLanguageSwitcherOperator\modify(), eZWordToImageOperator\modify(), eZModuleOperator\modify(), eZPDF\modify(), eZSimpleTagsOperator\modify(), eZTopMenuOperator\modify(), eZTemplateImageOperator\modify(), eZTemplateLocaleOperator\modify(), eZTemplateUnitOperator\modify(), eZTemplateStringOperator\modify(), eZURLOperator\modify(), eZTemplateAttributeOperator\namedParameterList(), eZContentBrowse\nodeAliasID(), eZContentUpload\nodeAliasID(), eZContentObjectAssignmentHandler\nodeID(), eZContentCacheManager\nodeListForObject(), eZIniSettingType\objectAttributeContent(), eZDataType\objectDisplayInformation(), eZContentUpload\objectFileInfo(), eZPHPCreator\open(), eZOperationHandler\operationIsAvailable(), eZTemplateUnitOperator\operatorTransform(), eZMail\outputCharset(), parameterSet(), eZContentObjectTreeNode\parentDepthLimitationList(), eZWordParser\parseFile(), eZPDFParser\parseFile(), parseFile(), eZContentObjectTreeNode\pathWithNames(), postInstallAdminSiteaccessINIUpdate(), postInstallUserSiteaccessINIUpdate(), precheckAllowed(), eZShopFunctions\preferredCurrencyCode(), eZSearchEngine\prepareWordIDArrays(), eZExtension\prependSiteAccess(), eZContentLanguage\prioritizedLanguages(), eZURLAliasFilterAppendNodeID\process(), ezpMobileDeviceRegexpFilter\process(), eZTemplateMenuFunction\process(), eZTemplateCacheFunction\process(), eZTemplateToolbarFunction\process(), eZURLAliasFilter\processFilters(), eZStepSiteTemplates\processPostData(), eZWebDAVContentBackend\propFind(), eZWebDAVContentServer\putContentData(), ezpSessionHandlerDB\read(), eZImageAnalyzer\readAnalyzerSettingsFromINI(), ezpMobileDeviceRegexpFilter\redirect(), eZInformationCollection\redirectURL(), ezpEvent\registerEventListeners(), eZSession\registerFunctions(), eZContentOperationCollection\registerSearchObject(), eZProductCategory\removeByID(), removeRelatedCache(), eZContentObjectTreeNode\removeThis(), ezpContentXHTMLRenderer\render(), eZDBInterface\reportError(), eZPackage\repositoryPath(), resetINI(), ezpRestCacheStorageApcCluster\restore(), eZContentBrowse\result(), eZUser\roleIDList(), eZDBInterface\rollback(), eZTranslationCache\rootCacheDirectory(), eZScriptTrashPurge\run(), ezpMvcConfiguration\runCustomFilters(), eZSiteAccess\saNameByLanguage(), eZSearchEngine\search(), eZMailTransport\send(), eZUserOperationCollection\sendActivationEmail(), eZFileTransport\sendMail(), eZSMTPTransport\sendMail(), eZSendmailTransport\sendMail(), eZDefaultConfirmOrderHandler\sendOrderEmail(), eZInformationCollection\sendOutEmail(), eZContentOperationCollection\sendToPublishingQueue(), eZUserOperationCollection\sendUserNotification(), eZTemplateTreeCache\setCachedTree(), eZSession\setCookieParams(), eZRSSEditFunction\setItemDefaults(), ezpSessionHandlerPHP\setSaveHandler(), eZIniSettingType\setSiteAccessList(), ezpRestNoAuthStyle\setup(), eZContentObjectAssignmentHandler\setupAssignments(), ezpLanguageSwitcher\setupTranslationSAList(), ezpRestAuthConfiguration\shallAuthenticate(), eZContentObjectTreeNode\showInvisibleNodes(), eZSiteAccess\siteAccessList(), eZStepInstaller\siteaccessURLs(), eZPackage\stateList(), eZHTTPFile\store(), eZPHPCreator\store(), eZStaticCache\storeCachedFile(), eZFSFileHandler\storeContents(), eZPackageType\storeObjectAttribute(), eZRSSEditFunction\storeRSSExport(), eZContentObjectTreeNode\subTreeCountByNodeID(), eZSSLZone\switchIfNeeded(), eZPackage\systemRepositoryInformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateToolbarFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateCompiler\TemplatePrefix(), eZURLWildcard\translate(), eZURLAliasML\translate(), ezpI18n\translateText(), eZInformationCollection\typeForObject(), eZPackage\typeList(), eZExtensionPackageHandler\uninstall(), eZIniSettingType\unserializeContentClassAttribute(), eZBinaryFileType\unserializeContentObjectAttribute(), eZMediaType\unserializeContentObjectAttribute(), eZShopFunctions\updateAutoRates(), ezpRestDebug\updateDebugSettings(), updateINI_1_1_0(), updateINI_1_2_0(), updateINI_1_4_0(), updateINIAccessType(), eZContentObjectTreeNode\updateSubTreePath(), eZContentUpload\upload(), eZContentObjectTreeNode\url(), eZContentObjectTreeNode\urlAlias(), eZContentClass\urlAliasName(), eZURLOperator\urlTransformation(), eZURLAliasML\urlTranslationEnabledByUri(), eZInformationCollection\userDataHandling(), eZIniSettingType\validateClassAttributeHTTPInput(), eZIniSettingType\validateObjectAttributeHTTPInput(), eZUserType\validateObjectAttributeHTTPInput(), eZContentClass\versionHistoryLimit(), eZXMLInputParser\wordMatchSupport(), eZLog\write(), ezpSessionHandlerDB\write(), and eZLog\writeStorageLog().

static eZINI::isCacheEnabled ( ) [static]

Returns whether INI cache is enabled globally, by default it is true.

See also:
setIsCacheEnabled().
Returns:
bool

Definition at line 190 of file ezini.php.

Referenced by eZINI().

static eZINI::isDebugEnabled ( ) [static]

Returns whether debugging of internals is enabled.

This will display which files are loaded an when cache files are created.

See also:
setIsDebugEnabled()
Returns:
bool

Definition at line 231 of file ezini.php.

static eZINI::isLoaded ( fileName = 'site.ini',
rootDir = 'settings',
useLocalOverrides = null 
) [static]

Returns whether the mentioned ini file has been loaded.

Parameters:
string$fileName
string$rootDir
null | bool$useLocalOverridesdefault system setting if null
Returns:
bool

Definition at line 1654 of file ezini.php.

static eZINI::isNoCacheAdviced ( ) [static]
Returns:
true if cache is not adviced to be used.
Note:
The no-cache-adviced flag might not be modified in time for site.ini and some other important files to be affected.

Definition at line 199 of file ezini.php.

Referenced by eZINI().

eZINI::isSettingReadOnly ( fileName = false,
blockName = false,
settingName = false 
)

Definition at line 1457 of file ezini.php.

Referenced by setGroups(), and setVariable().

static eZINI::isTextCodecEnabled ( ) [static]

Returns whether textcodecs is to be used, this will use the eZTextCodec class in the eZI18N library for text conversion.

See also:
setIsTextCodecEnabled()
Returns:
bool

Definition at line 257 of file ezini.php.

Referenced by eZINI().

eZINI::isVariableModified ( blockName,
varName 
)
Returns:
true if the variable $varName in group $blockName has been modified.

Definition at line 1399 of file ezini.php.

eZINI::load ( reset = true)

Tries to load the ini file specified in the constructor or instance() function.

If cache files should be used and a cache file is found it loads that instead.

Parameters:
bool$resetReset ini values on instance

Definition at line 319 of file ezini.php.

Referenced by eZINI().

eZINI::loadCache ( reset = true,
placement = false 
)

Will load a cached version of the ini file if it exists, if not it will parse the original file and create the cache file.

protected

Please use eZINI::load() or eZINI::loadPlacement()

Parameters:
bool$resetReset ini values on instance
bool$placementLoad cache for placment info, not the ini values themself.

Definition at line 462 of file ezini.php.

Referenced by load(), and loadPlacement().

eZINI::loadPlacement ( reset = true)

Tries to load the ini file placement specified in the constructor or instance() function.

If cache files should be used and a cache file is found it loads that instead.

Parameters:
bool$resetReset ini values on instance

Definition at line 337 of file ezini.php.

Referenced by groupPlacements().

eZINI::overrideDirs ( scope = null)

Return the override directories witch raw override dir data, or within a scope if $scope is set, see eZINI::defaultOverrideDirs() for how the raw data looks like.

Parameters:
string | null | false$scopeSee eZINI::defaultOverrideDirs() for possible scope values If false then you'll get raw override dir structure, null (default) is a simplified variant withouth scopes that is easy to iterate over.
Returns:
array

Definition at line 1049 of file ezini.php.

Referenced by cacheFileName(), and findInputFiles().

static eZINI::overrideDirsByScope ( array $  dirs,
scope = null 
) [static, protected]

Return the override directories witch raw override dir data, or within a scope if $scope is set, see eZINI::defaultOverrideDirs() for how the raw data looks like.

Parameters:
array$dirsDirectories directly from internal raw structure (see above).
string | null | false$scopeSee eZINI::defaultOverrideDirs() for possible scope values If false then you'll get raw override dir structure, null (default) is a simplified variant withouth scopes that is easy to iterate over.
Returns:
array

Definition at line 1083 of file ezini.php.

Referenced by globalOverrideDirs(), and overrideDirs().

static eZINI::parameterSet ( fileName = 'site.ini',
rootDir = 'settings',
&$  section,
&$  parameter 
) [static]

Check whether a specified parameter in a specified section is set in a specified file.

Deprecated:
Since 4.4
Parameters:
stringfileName file name (optional)
stringrootDir directory (optional)
stringsection section name
stringparameter parameter name
Returns:
bool True if the the parameter is set.

Definition at line 284 of file ezini.php.

Referenced by eZIniSettingType\initializeObjectAttribute(), and eZIniSettingType\objectAttributeContent().

eZINI::parse ( inputFiles = false,
iniFile = false,
reset = true,
placement = false 
) [private]

Parses either the override ini file or the standard file and then the append override file if it exists.

Definition at line 635 of file ezini.php.

Referenced by load(), loadCache(), and loadPlacement().

eZINI::parseFile ( file,
placement = false 
) [private]

Will parse the INI file and store the variables in the variable $this->BlockValues

Definition at line 661 of file ezini.php.

Referenced by parse().

eZINI::prependOverrideDir ( dir,
globalDir = false,
identifier = false,
scope = null 
)

Prepends the override directory $dir to the override directory list.

Prepends override dir to 'extension' scope by default, bellow siteaccess and override settings. See eZINI::defaultOverrideDirs() for how these parameters are used.

Parameters:
string$dir
bool$globalDir
string | false$identifierWill overwrite existing directory with same identifier if set
string | null$scope
Returns:
bool True if new dir was prepended, false if there was a $identifier match and a overwrite

Definition at line 1207 of file ezini.php.

Returns:
ReadonlySettingsCheck variable.

Definition at line 1736 of file ezini.php.

Referenced by isSettingReadOnly().

eZINI::removeGroup ( blockName)

Removes the group and all it's settings from the .ini file

Definition at line 1485 of file ezini.php.

Referenced by removeSetting().

eZINI::removeOverrideDir ( identifier,
scope = 'extension' 
)

Removes an override dir by identifier See eZINI::defaultOverrideDirs() for how these parameters are used.

Parameters:
string$identifierWill remove existing directory with identifier it it exists
string$scopeBy default 'extension'
Returns:
bool True if new dir was appended, false if there was a $identifier match and a overwrite

Definition at line 1166 of file ezini.php.

eZINI::removeSetting ( blockName,
settingName 
)

Definition at line 1491 of file ezini.php.

Removes all read data from .ini files.

Definition at line 1024 of file ezini.php.

Referenced by loadCache(), and parse().

static eZINI::resetAllGlobals ( resetGlobalOverrideDirs = true) [static]

Reset all eZINI instances as well override dirs ( optional )

Deprecated:
since 4.5, use resetAllInstances() instead
Parameters:
bool$resetOverrideDirsSpecify if you don't want to clear override dirs
See also:
resetAllInstances()

Definition at line 1780 of file ezini.php.

static eZINI::resetAllInstances ( resetGlobalOverrideDirs = true) [static]

Reset all eZINI instances as well override dirs ( optional )

Since:
4.5
Parameters:
bool$resetOverrideDirsSpecify if you don't want to clear override dirs

Definition at line 1792 of file ezini.php.

Referenced by eZScript\initialize(), eZSiteAccess\load(), and resetAllGlobals().

the cache file if it exists.

Definition at line 809 of file ezini.php.

static eZINI::resetGlobalOverrideDirs ( ) [static]

Reset the global override directories with data from eZINI::defaultOverrideDirs().

Definition at line 1145 of file ezini.php.

Referenced by resetAllInstances().

static eZINI::resetGlobals ( fileName = 'site.ini',
rootDir = 'settings',
useLocalOverrides = null 
) [static]

Resets a specific instance of eZINI.

Deprecated:
since 4.5, use resetInstance() instead
Parameters:
string$fileName
string$rootDir
null | bool$useLocalOverridesdefault system setting if null
See also:
resetInstance()

Definition at line 1752 of file ezini.php.

static eZINI::resetInstance ( fileName = 'site.ini',
rootDir = 'settings',
useLocalOverrides = null 
) [static]

Resets a specific instance of eZINI.

Since:
4.5
Parameters:
string$fileName
string$rootDir
null | bool$useLocalOverridesdefault system setting if null

Definition at line 1766 of file ezini.php.

Referenced by resetGlobals(), and eZTranslatorManager\setActiveTranslation().

Reset the override directories with data from eZINI::defaultOverrideDirs().

Definition at line 1153 of file ezini.php.

Returns:
the root directory from where all .ini and override files are read.

This is set by the instance() or eZINI() functions.

Definition at line 1035 of file ezini.php.

eZINI::save ( fileName = false,
suffix = false,
useOverride = false,
onlyModified = false,
useRootDir = true,
resetArrays = false,
encapsulateInPHP = true 
)

Saves the file to disk. If filename is given the file is saved with that name if not the current name is used. If $useOverride is true then the file will be placed in the override directory, if $useOverride is "append" it will append ".append" to the filename.

Definition at line 824 of file ezini.php.

eZINI::saveCache ( cachedDir,
cachedFile,
array $  data,
array $  inputFiles,
iniFile 
) [protected]

Stores the content of the INI object to the cache file $cachedFile.

Parameters:
string$cachedDirCache dir, usually "var/cache/ini/"
string$cachedFileName of cache file as returned by cacheFileName()
array$dataConfiguration data as an associative array structure
array$inputFilesList of input files used as basis for cache (for use in load cache to check mtime)
string$iniFileIni file path string returned by findInputFiles() for main ini file
Returns:
bool

Definition at line 578 of file ezini.php.

Referenced by loadCache().

static eZINI::selectOverrideScope ( scope,
identifier,
dir,
default 
) [static, protected]

Function to handle bc with code from pre 4.4 that does not know about scopes.

Since:
4.4
Parameters:
string | null$scope
string$identifier
string$dir
string$default
Returns:
string

Definition at line 1292 of file ezini.php.

Referenced by appendOverrideDir(), and prependOverrideDir().

eZINI::setGroups ( groupArray)

Sets all groups overwriting the current values

Definition at line 1584 of file ezini.php.

static eZINI::setIsCacheEnabled ( enabled) [static]

Sets whether caching is enabled for INI files or not.

This setting is global and can be overriden in the instance() function.

See also:
isCacheEnabled().
Parameters:
bool$enabled

Definition at line 217 of file ezini.php.

static eZINI::setIsDebugEnabled ( enabled) [static]

Sets whether internal debugging is enabled or not.

This setting is global and can be overriden in the instance() function.

See also:
isDebugEnabled().
Parameters:
bool$enabled

Definition at line 244 of file ezini.php.

static eZINI::setIsTextCodecEnabled ( enabled) [static]

Sets whether textcodec conversion is enabled or not.

See also:
isTextCodecEnabled().
Parameters:
bool$enabled

Definition at line 269 of file ezini.php.

eZINI::setOverrideDirs ( array $  newDirs,
scope = false 
)

Set the override directories witch raw override dir data, or within a scope if $scope is set, see eZINI::defaultOverrideDirs() for how the raw data looks like.

Parameters:
array$newDirs
string | false$scopeSee eZINI::defaultOverrideDirs() for possible scope values

Definition at line 1125 of file ezini.php.

Referenced by resetOverrideDirs().

Sets ReadonlySettingsCheck variable.

Definition at line 1728 of file ezini.php.

eZINI::settingType ( settingValue)

Definition at line 1561 of file ezini.php.

eZINI::setVariable ( blockName,
variableName,
variableValue 
)

Sets an INI file variable.

     $ini->setVariable( 'SiteSettings', 'SiteName', 'mysite' );
See also:
setVariables

Definition at line 1628 of file ezini.php.

Referenced by setVariables().

eZINI::setVariables ( variables)

Sets multiple variables from the array $variables.

Parameters:
$variablesContains an associative array with groups as first key, variable names as second key and variable values as values.
     $ini->setVariables( array( 'SiteSettings' => array( 'SiteName' => 'mysite',
                                                         'SiteURL'  => 'mysite.com' ) ) );
See also:
setVariable

Definition at line 1610 of file ezini.php.

eZINI::variable ( blockName,
varName 
)

Reads a variable from the ini file. false is returned if the variable was not found.

Definition at line 1331 of file ezini.php.

eZINI::variableArray ( blockName,
varName 
)

Reads a variable from the ini file. The variable will be returned as an array. ; is used as delimiter.

Definition at line 1409 of file ezini.php.

eZINI::variableMulti ( blockName,
varNames,
signatures = array() 
)

Reads multiple variables from the ini file. false is returned if the variable was not found.

Definition at line 1346 of file ezini.php.


Member Data Documentation

eZINI::$AddArrayDefinition

If true empty element will be created in the beginning of array if it is defined in this ini file.

Definition at line 1847 of file ezini.php.

eZINI::$BlockValues

Variable to store the ini file values.

Definition at line 1808 of file ezini.php.

eZINI::$BlockValuesPlacement

Variable to store the setting placement (which file is the setting in).

Definition at line 1811 of file ezini.php.

eZINI::$cacheEnabled = true [static, protected]

Definition at line 90 of file ezini.php.

Referenced by isCacheEnabled().

eZINI::$CacheFile

Stores the path and filename of the value cache file.

Definition at line 1826 of file ezini.php.

eZINI::$Charset

The charset of the ini file.

Definition at line 1802 of file ezini.php.

eZINI::$checkFileMtime = null [static, protected]

Definition at line 68 of file ezini.php.

eZINI::$Codec

Variable to store the textcodec.

Definition at line 1805 of file ezini.php.

eZINI::$debugEnabled = false [static, protected]

Definition at line 97 of file ezini.php.

Referenced by isDebugEnabled().

eZINI::$DirectAccess

If true then all file loads are done directly on the filename.

Definition at line 1844 of file ezini.php.

eZINI::$FileName

Stores the filename.

Definition at line 1817 of file ezini.php.

eZINI::$filePermission = null [static, protected]

Definition at line 76 of file ezini.php.

eZINI::$GlobalOverrideDirArray = null [static, protected]

Contains global override dirs.

Definition at line 1841 of file ezini.php.

Referenced by appendOverrideDir(), eZINI(), overrideDirs(), prependOverrideDir(), removeOverrideDir(), and setOverrideDirs().

eZINI::$instances = array() [static, protected]

Definition at line 83 of file ezini.php.

eZINI::$LocalOverrideDirArray

Contains the override dirs, if in local mode.

Definition at line 1838 of file ezini.php.

eZINI::$ModifiedBlockValues

Variable to store whether variables are modified or not.

Definition at line 1814 of file ezini.php.

eZINI::$PlacementCacheFile

Stores the path and filename of the placement cache file.

Definition at line 1829 of file ezini.php.

eZINI::$ReadOnlySettingsCheck = true

If true eZINI will check each setting (before saving) for correspondence of settings in site.ini[eZINISetting].ReadonlySettingList.

Definition at line 1850 of file ezini.php.

eZINI::$RootDir

The root of all ini files.

Definition at line 1820 of file ezini.php.

eZINI::$textCodecEnabled = true [static, protected]

Definition at line 104 of file ezini.php.

Referenced by isTextCodecEnabled().

eZINI::$UseCache

true if cache should be used

Definition at line 1832 of file ezini.php.

eZINI::$UseLocalOverrides

true if the overrides should only be changed locally

Definition at line 1835 of file ezini.php.

eZINI::$UseTextCodec

Whether to use the text codec when reading the ini file or not.

Definition at line 1823 of file ezini.php.

const eZINI::CONFIG_CACHE_DIR = 'var/cache/ini/'

Definition at line 51 of file ezini.php.

Referenced by loadCache().

Definition at line 58 of file ezini.php.

Referenced by loadCache(), and saveCache().


The documentation for this class was generated from the following file: