PHP code example of pentagonal / modular

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

    

pentagonal / modular example snippets



use Pentagonal\Modular\Reader;

$reader = new Reader('/Path/To/Directory');
$reader->configure();
$modules = $reader->getValidModules();

// init all module
foreach ($modules as $moduleIdentifier => $module) {
    // initialize per module
    // this only called once on module base
    $module->finalInitOnce();
}

txt
- Php 7.0 or later
- Php tokenizer extension enabled
- `spl` enabled
- function `eval` allowed (for validate php file - optional)