PHP code example of 0x20h / monoconf

1. Go to this page and download the library: Download 0x20h/monoconf library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

0x20h / monoconf example snippets

 php

 Monoconf\Monoconf;

// initialize monoconf
Monoconf::config(json_decode(file_get_contents('monoconf.json'), true));
 php
namespace MyApp\Controller;

class SomeController {

    protected $Log;

    public function __construct() {
        self::$Log = \Monoconf\Monoconf::getLogger(__CLASS__);
    }

    public function someAction()
    {
        self::$Log->debug(__METHOD__.' called');
    }
}

phpunit --bootstrap tests/bootstrap.php tests/