jIniFile
in package
utility class to read and write an ini file
Tags
Table of Contents
- read() : array<string|int, mixed>|false
- read an ini file
- write() : mixed
- write some data in an ini file the data array should follow the same structure returned by the read method (or parse_ini_file)
- _iniValue() : string
- format a value to store in a ini file
Methods
read()
read an ini file
public
static read(string $filename) : array<string|int, mixed>|false
Parameters
- $filename : string
-
the path and the name of the file to read
Return values
array<string|int, mixed>|false —the content of the file or false if the ini format is invalid
write()
write some data in an ini file the data array should follow the same structure returned by the read method (or parse_ini_file)
public
static write(array<string|int, mixed> $array, string $filename[, string $header = '' ][, int $chmod = null ]) : mixed
Parameters
- $array : array<string|int, mixed>
-
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 : int = null
Tags
Return values
mixed —_iniValue()
format a value to store in a ini file
private
static _iniValue(mixed $key, string $value) : string
Parameters
- $key : mixed
- $value : string
-
the value
Return values
string —the formated value