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    
Last Updated Ratings Unique User Downloads Download Rankings
2022-01-30 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 57 All time: 10,175 This week: 174Up
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: 237056 in Poland Poland
Week rank: 488 Up9 in Poland Poland Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Details

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:57
This week:0
All time:10,175
This week:174Up
For more information send a message to info at phpclasses dot org.