2017 © Pedro Peláez
 

library ini

Simple INI Configuration Wrapper

image

djdaca/ini

Simple INI Configuration Wrapper

  • Thursday, June 21, 2018
  • by djdaca
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 11 % Grown

The README.md

PHP Simple INI Wrapper

Configuration class provide parsing and writing extended INI, (*1)

API

$INI = Ini::getInstance();, (*2)

$INI->addFile('/config.ini');, (*3)

....., (*4)

config.ini, (*5)

[section], (*6)

var=1, (*7)

....., (*8)

$var = Ini::section('var');, (*9)

or ..., (*10)

$var = $INI->section('var');, (*11)

or ..., (*12)

$var = $INI->getSection('section', 'var');, (*13)

and if you want modify config just call, (*14)

$INI->set('section', array('var' => 2));, (*15)

Simple - or not ? :), (*16)

....., (*17)

You can export or import by methods $INI->export() and $INI->import ($config), (*18)

Best of end, (*19)

If u want modify config - you can write array to ini file by method $INI->write($file);, (*20)

INI

Extend ini syntax is similar to http://en.wikipedia.org/wiki/INI_file but u can write multiple levels of key by dot like:, (*21)

key1.key2.key3 = value, (*22)

This will be translated to:, (*23)

array('key1' => array('key2' => array('key3' => 'value')));, (*24)

The Versions

21/06 2018

dev-master

9999999-dev

Simple INI Configuration Wrapper

  Sources   Download

The Requires

  • php >=5.3.0