jIniFile

utility class to read and write an ini file

package

jelix

subpackage

utils

since 1.0b1

Methods

format a value to store in a ini file

_iniValue( $key, string $value) : string
static

Arguments

$key

$value

string

the value

Response

string

the formated value

read an ini file

read(string $filename) : array|false
static

Arguments

$filename

string

the path and the name of the file to read

Response

array|false

the content of the file or false if the ini format is invalid

write some data in an ini file the data array should follow the same structure returned by the read method (or parse_ini_file)

write(array $array, string $filename, string $header = '', integer $chmod = null) 
static
Throws
\Exception
\jException

Arguments

$array

array

the content of an ini file

$filename

string

the path and the name of the file use to store the content

$header

string

some content to insert at the begining of the file

$chmod

integer