IQRF PHP file manager

IniProcessor
in package

Utility for serializing and deserializing INI format

Table of Contents

Methods

decode()  : array<string, mixed>
Parses INI to PHP array value
encode()  : string
Converts PHP array value to INI format, note that only level of nested objects is processed.
encodePair()  : string
Encodes key and value pair to INI line
encodeSection()  : string
Encodes an array of values into INI section block

Methods

decode()

Parses INI to PHP array value

public static decode(string $content) : array<string, mixed>
Parameters
$content : string

INI content

Return values
array<string, mixed>

Parsed INI content

encode()

Converts PHP array value to INI format, note that only level of nested objects is processed.

public static encode(array<string, mixed> $array) : string
Parameters
$array : array<string, mixed>

PHP array value to encode

Return values
string

Value in INI format

encodePair()

Encodes key and value pair to INI line

private static encodePair(string $key, mixed $value) : string
Parameters
$key : string

Key

$value : mixed

Value

Return values
string

INI encoded key and value pair

encodeSection()

Encodes an array of values into INI section block

private static encodeSection(string $section, array<string, mixed> $values) : string
Parameters
$section : string

Section name

$values : array<string, mixed>

Array of values

Return values
string

        
On this page

Search results