PHP code example of anax / configure

1. Go to this page and download the library: Download anax/configure 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/ */

    

anax / configure example snippets


$config = new \Anax\Configure\Configuration();
$dirs = ["path1", "path2"];
$config->setBaseDirectories($dirs);

$config = $di->get("configuration")->load("route")

$config = [
    "file" => filename for route.php,
    "config" => result returned from route.php,
    "items" => [
        [
            "file" => filename for route/file1.php,
            "config" => result returned from route/file1.php,
        ],
        [
            "file" => filename for route/file2.php,
            "config" => result returned from route/file2.php,
        ],
    ].
];