PHP code example of mlo / file-loader

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

    

mlo / file-loader example snippets


$cacheDirectory = 'app/cache/config';
$dataDirectory  = 'app/config';

$loader = new \Mlo\FileLoader\FileLoader($cacheDirectory, $dataDirectory, [
    new \Mlo\FileLoader\IniFileLoader(),
    new \Mlo\FileLoader\JsonFileLoader(),
    new \Mlo\FileLoader\YamlFileLoader(),
]);

$config = $loader->load('database.yml');