eZ Publish  [4.0]
eZINI Class Reference

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

List of all members.

Public Member Functions

 appendOverrideDir ($dir, $globalDir=false, $identifier=false)
 assign ($blockName, $varName, &$variable)
 eZINI ($fileName, $rootDir="", $useTextCodec=null, $useCache=null, $useLocalOverrides=null, $directAccess=false, $addArrayDefinition=false)
 filename ()
findSettingPlacement ($path)
 getNamedArray ()
group ($blockName)
groupPlacements ()
groups ()
 hasGroup ($blockName)
 hasSection ($sectionName)
 hasVariable ($blockName, $varName)
 isNoCacheAdviced ()
 isSettingReadOnly ($fileName=false, $blockName=false, $settingName=false)
 isVariableModified ($blockName, $varName)
 load ($reset=true)
 loadPlacement ($reset=true)
 overrideDirs ()
 prependOverrideDir ($dir, $globalDir=false, $identifier=false)
 readOnlySettingsCheck ()
 removeGroup ($blockName)
 removeSetting ($blockName, $settingName)
 reset ()
 resetCache ()
 rootDir ()
 save ($fileName=false, $suffix=false, $useOverride=false, $onlyModified=false, $useRootDir=true, $resetArrays=false, $encapsulateInPHP=true)
 setGroups ($groupArray)
 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 exists ($fileName="site.ini", $rootDir="settings")
static & fetchFromFile ($fileName, $useTextCodec=null)
static getSiteAccessIni ($siteAccess, $iniFile)
static instance ($fileName="site.ini", $rootDir="settings", $useTextCodec=null, $useCache=null, $useLocalOverrides=null, $directAccess=false, $addArrayDefinition=false)
static isCacheEnabled ()
static isDebugEnabled ()
static isLoaded ($fileName="site.ini", $rootDir="settings", $useLocalOverrides=null)
static isTextCodecEnabled ()
static parameterSet ($fileName= 'site.ini', $rootDir= 'settings', &$section, &$parameter)
static resetGlobals ($fileName="site.ini", $rootDir="settings", $useLocalOverrides=null)
static setIsCacheEnabled ($cache)
static setIsDebugEnabled ($debug)
static setIsTextCodecEnabled ($codec)

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 CACHE_CODE_DATE = 1043407542
const DEBUG_INTERNALS = false

Static Protected Attributes

static $filePermission = 0666

Private Member Functions

 findInputFiles (&$inputFiles, &$iniFile)
 loadCache ($reset=true, $placement=false)
 parse ($inputFiles=false, $iniFile=false, $reset=true, $placement=false)
 parseFile ($file, $placement=false)
 saveCache ($cachedDir, $cachedFile, $data)

Detailed Description

Reads and writes .ini style configuration files.

Has the date of the current cache code implementation as a timestamp, if this changes(increases) the cache files will need to be recreated.

The most common way of using it is.

  // include the file
  //include_once( "classes/ezinifile.php" );

  $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 77 of file ezini.php.


Member Function Documentation

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

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

Definition at line 1006 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 1043 of file ezini.php.

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

Similar to instance() but will always create a new copy.

Definition at line 1423 of file ezini.php.

Referenced by updateINI_1_2_0().

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 236 of file ezini.php.

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

eZINI::eZINI ( fileName,
rootDir = "",
useTextCodec = null,
useCache = null,
useLocalOverrides = null,
directAccess = false,
addArrayDefinition = false 
)

Initialization of object;

Definition at line 89 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 1400 of file ezini.php.

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

eZINI::filename ( )
Returns:
the filename.

Definition at line 128 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 291 of file ezini.php.

Referenced by loadCache(), and parse().

& eZINI::findSettingPlacement ( path)

Definition at line 1242 of file ezini.php.

eZINI::getNamedArray ( )

Returns BlockValues, which is a nicely named Array

Definition at line 1354 of file ezini.php.

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

Get instance siteaccess specific site.ini

Parameters:
siteAccessthe site access to get ini for
iniFilethe site access to get ini for
Returns:
eZINI object, or false if not found

Definition at line 1413 of file ezini.php.

& eZINI::group ( blockName)

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

Definition at line 1167 of file ezini.php.

& eZINI::groupPlacements ( )

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

Definition at line 1233 of file ezini.php.

& eZINI::groups ( )

Fetches all defined groups and returns them as an associative array

Definition at line 1225 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 1159 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 1118 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 1110 of file ezini.php.

Referenced by assign().

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

Returns the current instance of the given .ini file 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.

Definition at line 1379 of file ezini.php.

Referenced by eZDBFileHandlerMysqlBackend\_connect(), eZTARArchiveHandler\_extractList(), eZExtension\activateExtensions(), eZExtension\activeExtensions(), eZModule\activeModuleRepositories(), eZInstallScriptPackageHandler\add(), eZExtensionPackageHandler\add(), eZCodeTemplate\allCodeFiles(), eZInformationCollection\allowAnonymous(), eZMail\allowedCharsets(), eZNotificationEventType\allowedTypes(), eZWorkflowType\allowedTypes(), eZDataType\allowedTypes(), eZTemplateCompiler\alwaysGenerate(), eZImageAnalyzer\analyzerData(), eZContentCacheManager\appendRelatingNodeIDs(), eZPackage\applyStorageFilePermissions(), eZImage\attribute(), eZInformationCollection\attributeHideList(), eZNotificationEventFilter\availableHandlers(), eZWebDAVContentServer\availableSites(), eZExtension\baseDirectory(), eZDBInterface\begin(), eZContentBrowse\browse(), eZTranslationCache\cacheDirectory(), eZURLWildcard\cacheInfo(), eZContentCache\cachePathInfo(), eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentClass\canInstantiateClasses(), eZContentClass\canInstantiateClassList(), Cezpdf\Cezpdf(), changeDBCharsetORACLE(), eZImageHandler\changeFilePermissions(), eZSSLZone\checkModuleView(), eZTipafriendRequest\checkReceiver(), eZContentObjectTreeNode\childrenByName(), eZUserType\classAttributeRemovableInformation(), eZDataType\classDisplayInformation(), eZContentClassPackageHandler\classDOMTree(), eZTipafriendRequest\cleanup(), eZContentCache\cleanup(), eZSubtreeCache\cleanupCacheDir(), eZBasket\cleanupCurrentBasket(), eZContentCacheManager\clearAllContentCache(), eZContentCacheManager\clearObjectViewCache(), eZContentCacheManager\clearObjectViewCacheIfNeeded(), eZContentCacheManager\clearTemplateBlockCacheIfNeeded(), eZDBInterface\commit(), eZTemplateCompiler\compileTemplate(), eZURLAliasML\convertToAlias(), eZFileHandler\copy(), eZVatRule\country(), eZPDFExport\create(), eZRSSExport\create(), eZDiffXMLTextEngine\createDifferenceObject(), eZContentObjectTreeNode\createExtendedAttributeFilterSQLStrings(), eZWebDAVContentServer\createFolder(), eZImageShellHandler\createFromINI(), eZImageGDHandler\createFromINI(), eZContentObject\createNewVersion(), eZOrder\customerList(), eZMultiOption2Type\customObjectAttributeHTTPAction(), eZObjectRelationType\customObjectAttributeHTTPAction(), eZObjectRelationListType\customObjectAttributeHTTPAction(), eZWebDAVServer\dataCharset(), eZTemplateLocaleOperator\dateTimeTransformation(), eZCodeMapper\decodeCommand(), eZContentObject\defaultLanguage(), eZContentCacheManager\dependencyInfo(), eZContentUpload\detectClassIdentifier(), eZContentUpload\detectLocations(), eZDir\directoryPermission(), eZInformationCollection\displayHandling(), eZObjectRelationListType\domString(), eZMatrix\domString(), eZVatType\dynamicVatTypeName(), eZHTTPHeader\enabled(), eZSSLZone\enabled(), eZDefaultConfirmOrderHandler\execute(), eZSimpleShippingType\execute(), eZStaticCache\executeActions(), eZFunctionHandler\executeAlias(), eZCodeMapper\executeCommandCode(), eZContentObjectEditHandler\executeInputHandlers(), eZContentObjectEditHandler\executePublish(), eZContentObject\expireTemplateBlockCacheIfNeeded(), eZISBN13\extractISBNNumber(), eZCodeTemplate\eZCodeTemplate(), eZDBFileHandler\eZDBFileHandler(), eZDBInterface\eZDBInterface(), eZMail\eZMail(), eZPDF\eZPDF(), eZPostgreSQLDB\eZPostgreSQLDB(), eZRegisterSessionFunctions(), eZSessionRead(), eZSessionStart(), eZSessionWrite(), eZSimplifiedXMLInput\eZSimplifiedXMLInput(), eZStaticCache\eZStaticCache(), eZTemplateImageOperator\eZTemplateImageOperator(), 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(), eZWebDAVContentServer\fetchNodeInfo(), eZPackageType\fetchObjectAttributeHTTPInput(), eZUserType\fetchObjectAttributeHTTPInput(), eZProductCategory\fetchProductCountByCategory(), eZRSSExport\fetchRSS1_0(), eZRSSExport\fetchRSS2_0(), eZTemplateExecuteOperator\fetchTransform(), eZRSSImport\fieldMap(), eZFilePackageHandler\fileExists(), eZFSFileHandler\fileStoreContents(), eZExtension\findExtensionType(), eZContentUpload\findHandler(), eZSiteAccess\findPathToSiteAccess(), eZURLAliasML\findUniqueText(), eZImageVariation\fullPath(), eZCodeMapper\generateCommandCode(), eZContentObjectPackageHandler\generateFetchAliasArray(), eZContentCacheManager\generateObjectViewCache(), eZContentObjectPackageHandler\generateOverrideSettingsArray(), eZNodeviewfunctions\generateViewCacheFile(), eZSearch\getEngine(), eZDir\getPathFromFilename(), eZDefaultVATHandler\getProductCategory(), eZSSLZone\getSSLZones(), eZVATManager\getUserCountryAttributeName(), eZGeneralDigestHandler\handle(), eZExtensionPackageHandler\handleAddParameters(), eZContentUpload\handleLocalFile(), eZContentObjectPackageHandler\handleParameters(), eZSubTreeHandler\handlePublishEvent(), eZContentUpload\handleUpload(), eZImage\hasAttribute(), eZImageInterface\hasGD2(), eZHTTPHeader\headerOverrideArray(), eZi18nOperator\i18nTrans(), eZImageAliasHandler\imagePath(), eZImageAliasHandler\imagePathByNode(), eZContentCache\inCleanupThresholdRange(), eZCollaborationItemHandler\ini(), eZPDFTable\initFrameMargins(), eZModule\initialize(), eZContentObjectEditHandler\initialize(), eZSimpleTagsOperator\initializeIncludes(), eZIniSettingType\initializeObjectAttribute(), eZURLOperator\iniTrans(), eZINIAddonPackageHandler\install(), eZExtensionPackageHandler\install(), eZContentObjectPackageHandler\installFetchAliases(), eZContentObjectPackageHandler\installOverrides(), eZContentObjectPackageHandler\installTemplates(), eZTemplateTreeCache\internalKey(), eZTemplateCompiler\isAccumulatorsEnabled(), eZTemplateTreeCache\isCacheEnabled(), eZTemplateCompiler\isCommentsEnabled(), eZTemplateCompiler\isCompilationEnabled(), eZContentObject\isComplexViewMode(), eZTemplateCompiler\isDevelopmentModeEnabled(), eZTemplateCompiler\isExecutionEnabled(), eZTemplateCompiler\isFallbackResourceCodeEnabled(), eZSSLZone\isKeepModeView(), eZWebDAVServer\isLoggingEnabled(), eZTemplateCompiler\isNodePlacementEnabled(), eZWebDAVContentServer\isObjectFolder(), eZContentObject\isObjectRelationTyped(), isSettingReadOnly(), eZTemplateCompiler\isTimingPointsEnabled(), eZTemplateCompiler\isTreeEnabled(), eZVATManager\isUserCountryRequired(), 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(), eZContentObjectTreeNode\makeObjectsArray(), eZContentObject\matchIngroupIDList(), eZContentBrowseRecent\maximumRecentItems(), eZBinaryFile\metaData(), eZWordToImageOperator\modify(), eZPDF\modify(), eZSimpleTagsOperator\modify(), eZTopMenuOperator\modify(), eZTemplateImageOperator\modify(), eZTemplateLocaleOperator\modify(), eZTemplateUnitOperator\modify(), eZURLOperator\modify(), eZTemplateStringOperator\modify(), eZContentBrowse\nodeAliasID(), eZContentUpload\nodeAliasID(), eZContentObjectAssignmentHandler\nodeID(), eZIniSettingType\objectAttributeContent(), eZDataType\objectDisplayInformation(), eZContentUpload\objectFileInfo(), eZIniSettingType\onPublish(), eZPHPCreator\open(), eZTemplateUnitOperator\operatorTransform(), eZMail\outputCharset(), parameterSet(), eZWordParser\parseFile(), eZPDFParser\parseFile(), parseFile(), eZContentObjectTreeNode\pathWithNames(), postInstallAdminSiteaccessINIUpdate(), postInstallUserSiteaccessINIUpdate(), eZExtension\prependSiteAccess(), eZContentLanguage\prioritizedLanguages(), eZTemplateMenuFunction\process(), eZTemplateCacheFunction\process(), eZTemplateToolbarFunction\process(), eZURLAliasFilter\processFilters(), eZWebDAVContentServer\putContentData(), eZImageAnalyzer\readAnalyzerSettingsFromINI(), eZInformationCollection\redirectURL(), eZProductCategory\removeByID(), eZContentObjectTreeNode\removeThis(), eZDBInterface\reportError(), eZPackage\repositoryPath(), eZImageVariation\requestVariation(), resetINI(), eZContentBrowse\result(), eZDBInterface\rollback(), eZTranslationCache\rootCacheDirectory(), eZMailTransport\send(), eZSMTPTransport\sendMail(), eZFileTransport\sendMail(), eZSendmailTransport\sendMail(), eZDefaultConfirmOrderHandler\sendOrderEmail(), eZInformationCollection\sendOutEmail(), eZTemplateTreeCache\setCachedTree(), eZIniSettingType\setSiteAccessList(), eZContentObjectAssignmentHandler\setupAssignments(), eZContentObjectTreeNode\showInvisibleNodes(), eZSiteAccess\siteAccessList(), eZPackage\stateList(), eZHTTPFile\store(), eZPHPCreator\store(), eZStaticCache\storeCachedFile(), eZFSFileHandler\storeContents(), eZPackageType\storeObjectAttribute(), eZContentObjectTreeNode\subTreeCountByNodeID(), eZSSLZone\switchIfNeeded(), templateInit(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateToolbarFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateCompiler\TemplatePrefix(), eZURLWildcard\translate(), eZInformationCollection\typeForObject(), eZPackage\typeList(), eZExtensionPackageHandler\uninstall(), eZIniSettingType\unserializeContentClassAttribute(), eZBinaryFileType\unserializeContentObjectAttribute(), eZMediaType\unserializeContentObjectAttribute(), updateINI_1_2_0(), updateINIAccessType(), eZContentObjectTreeNode\updateSubTreePath(), eZContentUpload\upload(), eZInformationCollection\userDataHandling(), eZIniSettingType\validateClassAttributeHTTPInput(), eZIniSettingType\validateObjectAttributeHTTPInput(), eZUserType\validateObjectAttributeHTTPInput(), eZXMLInputParser\wordMatchSupport(), eZLog\write(), and eZLog\writeStorageLog().

static eZINI::isCacheEnabled ( ) [static]
Returns:
true if INI cache is enabled globally, the default value is true. Change this setting with setIsCacheEnabled.

Definition at line 138 of file ezini.php.

Referenced by eZINI().

static eZINI::isDebugEnabled ( ) [static]
Returns:
true if debugging of internals is enabled, this will display which files are loaded and when cache files are created. Set the option with setIsDebugEnabled().

Definition at line 175 of file ezini.php.

Referenced by appendOverrideDir(), loadCache(), parseFile(), prependOverrideDir(), and saveCache().

static eZINI::isLoaded ( fileName = "site.ini",
rootDir = "settings",
useLocalOverrides = null 
) [static]
Returns:
true if the ini file $fileName has been loaded yet.

Definition at line 1363 of file ezini.php.

eZINI::isNoCacheAdviced ( )
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 149 of file ezini.php.

Referenced by eZINI().

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

Definition at line 1180 of file ezini.php.

Referenced by setGroups(), and setVariable().

static eZINI::isTextCodecEnabled ( ) [static]
Returns:
true if textcodecs is to be used, this will use the eZTextCodec class in the eZI18N library for text conversion. Set the option with setIsTextCodecEnabled().

Definition at line 197 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 1126 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. Set $reset to false if you don't want to reset internal data.

Definition at line 256 of file ezini.php.

Referenced by eZINI().

eZINI::loadCache ( reset = true,
placement = false 
) [private]

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.

Definition at line 360 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. Set $reset to false if you don't want to reset internal data.

Definition at line 273 of file ezini.php.

Referenced by groupPlacements().

eZINI::overrideDirs ( )
Returns:
the override directories, if no directories has been set "override" is returned.

The override directories are returned as an array of arrays. The first value in the array is the override directory, the second is a boolean which defines if the directory is relative to the rootDir() or not. If the second value is false the override dir is relative, true means that the override dir is relative to the eZ Publish root directory. The third value of the array will contain the identifier of the override, if it exists. Identifiers are useful if you want to overwrite the current override setting.

Definition at line 953 of file ezini.php.

Referenced by findInputFiles().

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

Check wether a specified parameter in a specified section is set in a specified file

Parameters:
filename(optional)
directory(optional)
sectionname
parametername
Returns:
true if the the parameter is set.

Definition at line 222 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 537 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 558 of file ezini.php.

Referenced by parse().

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

Appends the override directory $dir to the override directory list. If global dir is set top

Definition at line 969 of file ezini.php.

eZINI::readOnlySettingsCheck ( )
Returns:
ReadonlySettingsCheck variable.

Definition at line 1440 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 1208 of file ezini.php.

Referenced by removeSetting().

eZINI::removeSetting ( blockName,
settingName 
)

Definition at line 1214 of file ezini.php.

eZINI::reset ( )

Removes all read data from .ini files.

Definition at line 926 of file ezini.php.

Referenced by loadCache(), and parse().

eZINI::resetCache ( )

the cache file if it exists.

Definition at line 708 of file ezini.php.

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

Definition at line 1448 of file ezini.php.

eZINI::rootDir ( )
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 937 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 723 of file ezini.php.

eZINI::saveCache ( cachedDir,
cachedFile,
data 
) [private]

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

Definition at line 492 of file ezini.php.

Referenced by loadCache().

eZINI::setGroups ( groupArray)

Sets all groups overwriting the current values

Definition at line 1298 of file ezini.php.

static eZINI::setIsCacheEnabled ( cache) [static]

Sets whether caching is enabled for INI files or not. This setting is global and can be overriden in the instance() function.

Definition at line 164 of file ezini.php.

static eZINI::setIsDebugEnabled ( debug) [static]

Sets whether internal debugging is enabled or not.

Definition at line 186 of file ezini.php.

static eZINI::setIsTextCodecEnabled ( codec) [static]

Sets whether textcodec conversion is enabled or not.

Definition at line 208 of file ezini.php.

eZINI::setReadOnlySettingsCheck ( readOnly = true)

Sets ReadonlySettingsCheck variable.

Definition at line 1432 of file ezini.php.

eZINI::settingType ( settingValue)

Definition at line 1275 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 1342 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' => 'http://mysite.com' ) ) );
See also:
setVariable

Definition at line 1324 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 1056 of file ezini.php.

Referenced by assign(), and variableArray().

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 1136 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 1073 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 1498 of file ezini.php.

eZINI::$BlockValues

Variable to store the ini file values.

Definition at line 1462 of file ezini.php.

eZINI::$BlockValuesPlacement

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

Definition at line 1465 of file ezini.php.

eZINI::$CacheFile

Stores the path and filename of the value cache file.

Definition at line 1480 of file ezini.php.

eZINI::$Charset

The charset of the ini file.

Definition at line 1456 of file ezini.php.

eZINI::$Codec

Variable to store the textcodec.

Definition at line 1459 of file ezini.php.

eZINI::$DirectAccess

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

Definition at line 1495 of file ezini.php.

eZINI::$FileName

Stores the filename.

Definition at line 1471 of file ezini.php.

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

Definition at line 84 of file ezini.php.

eZINI::$LocalOverrideDirArray

Contains the override dirs, if in local mode.

Definition at line 1492 of file ezini.php.

eZINI::$ModifiedBlockValues

Variable to store whether variables are modified or not.

Definition at line 1468 of file ezini.php.

eZINI::$PlacementCacheFile

Stores the path and filename of the placement cache file.

Definition at line 1483 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 1501 of file ezini.php.

eZINI::$RootDir

The root of all ini files.

Definition at line 1474 of file ezini.php.

eZINI::$UseCache

true if cache should be used

Definition at line 1486 of file ezini.php.

eZINI::$UseLocalOverrides

true if the overrides should only be changed locally

Definition at line 1489 of file ezini.php.

eZINI::$UseTextCodec

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

Definition at line 1477 of file ezini.php.

const eZINI::CACHE_CODE_DATE = 1043407542

Definition at line 79 of file ezini.php.

Referenced by loadCache(), and saveCache().

const eZINI::DEBUG_INTERNALS = false

Definition at line 80 of file ezini.php.

Referenced by isDebugEnabled().


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