PHP Classes

Dframe Config File: Load configuration values from scripts with arrays

Recommend this page to a friend!
  Info   View files Documentation   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 59 This week: 1All time: 10,451 This week: 89Up
Version License PHP version Categories
dframe-config 4.1.7The PHP License7PHP 5, Configuration
Description 

Author

This class can load configuration values from scripts with arrays.

It takes as parameter the path of a PHP script with configuration values defined as array.

The class loads configuration file and returns the individual configuration values using a getter function.

Picture of Slawomir Kaleta
  Performance   Level  
Name: Slawomir Kaleta <contact>
Classes: 15 packages by
Country: Poland Poland
Age: ???
All time rank: 233255 in Poland Poland
Week rank: 91 Up1 in Poland Poland Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Documentation

Dframe/Config - Component

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

php framework dframe logo

Documentation - Config PHP

Composer

$ composer require dframe/config

Standalone

use Dframe\Config\Config;

include_once 'vendor/autoload.php';
$configPath = __DIR__. DIRECTORY_SEPARATOR . 'config'. DIRECTORY_SEPARATOR;

$config = Config::load('ConfigFile', $configPath);
$config->get('key1'); // Return value
$config->get('keyValid', 'yes'); // return 'yes' ||  if key does not exist then you can replace value

License

Open-sourced software licensed under the MIT license


  Files folder image Files  
File Role Description
Files folder imageExceptions (1 file)
Files folder imageTests (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Plain text file Config.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  Exceptions  
File Role Description
  Plain text file ConfigException.php Class Class source

  Files folder image Files  /  Tests  
File Role Description
  Plain text file ConfigTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:59
This week:1
All time:10,451
This week:89Up