PHP Classes

File: docs/extensions/

Recommend this page to a friend!
  Classes of Slawomir Kaleta  >  Dframe Framework  >  docs/extensions/  >  Download  
File: docs/extensions/
Role: Example script
Content type: text/markdown
Description: Example script
Class: Dframe Framework
Modular MVC based PHP Web framework
Author: By
Last change: Update of docs/extensions/
Date: 1 year ago
Size: 517 bytes


Class file image Download


You can fast set and load configs

Create file in app\config\myConfigFile.php

return [
    'key1' => 'value', 
    'key2' => ['value'],
    'key3' => [
        'key1' => 'value'

Usage in controller

use Dframe\Config\Config;

include_once 'vendor/autoload.php';

$config = Config::load('myConfigFile');

echo $config->get('key1'); // display 'value'
echo $config->get('keyValid', 'yes'); // display 'yes' ||  if key is not exist then you can replace value
For more information send a message to info at phpclasses dot org.