Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

eZINI Class Reference
Utility classes

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

## 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" );
$ini
$ini
Definition: classes/admin/linklist.php:64

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.

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

- ezini.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.