2017 © Pedro Peláez
 

library configuration_reader

Framework independent simple .ini configuration reader

image

elzekool/configuration_reader

Framework independent simple .ini configuration reader

  • Sunday, July 14, 2013
  • by elzekool
  • Repository
  • 0 Watchers
  • 0 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

ConfigurationReader

Fast .ini parser. Framework independant. Allows reading .ini files using an object oriented interface. Supports overloading configuration from multiple .ini files., (*1)

Usage

  • PHP 5.3.* is required
  • Create instance of ConfigurationReader passing list of files
  • Read configuration options with get($option, $default) function

Example


use ElzeKool\ConfigurationReader\ConfigurationReader; $config = new ConfigurationReader(array( 'configuration/config.ini', // [group] // option1="value" // option2="value2" // option3[]="value3" // option3[]="value4" 'configuration/test/config.ini', // Does not exist 'configuration/development/config.ini' // [group] // option1="altvalue1" // option3[]="altvalue3" // option3[]="altvalue4" // option5="development" )); var_dump($config->get('group.option1')); // string(9) "altvalue1" var_dump($config->get('group.doesnotexists', 'nope')); // string(4) "nope" print_r($config->get('group')); // Array // ( // [option1] => altvalue1 // [option2] => value2 // [option3] => Array // ( // [0] => altvalue3 // [1] => altvalue4 // ) // // [option5] => development // )

License

(MIT License), (*2)

Copyright (c) 2013 Elze Kool info@kooldevelopment.nl, (*3)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*4)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*5)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*6)

The Versions

14/07 2013

dev-master

9999999-dev https://github.com/elzekool/ConfigurationReader

Framework independent simple .ini configuration reader

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

parser configuration ini library

14/07 2013

0.1.0

0.1.0.0 https://github.com/elzekool/ConfigurationReader

Framework independent simple .ini configuration reader

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

parser configuration ini library