PHP code example of aura / includer

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

    

aura / includer example snippets



$loader->addNamespace('Module\Foo', __DIR__);


$config->setValue('db_host', 'localhost');


$router->setPath('/blog/read/{id}', function ($id) {
    // logic for the blog "read" action
});


use Aura\Includer\Includer;

$


$path/to/modules/foo',
    '/path/to/modules/bar',
    '/path/to/modules/baz',
));


$utoload.php',
    'config/default.php',
    'config/testing.php',
    'routes.php',
));


$loader = new Loader(...);
$config = new Config(...);
$router = new Router(...);

$


$


// turn off strict processing
$


// load all '.php' files in each of the directories
$


$text = $


$text = ' /** '
      . date('Y-m-d H:i:s')
      . ' */' . PHP_EOL . PHP_EOL
      . $text;

file_put_contents('/path/to/cache_file.php', $text);


$der->load(); // uses the cache file if it exists