PHP code example of symbiotic / autoloader

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

    

symbiotic / autoloader example snippets


// Include Autoloader file
 // Put the autoloader at the beginning of the queue
    'prepend' => false,
    // Directories for searching packages
    'scan_dirs' => [
         $basePath.'/modules',
         $basePath.'/plugins'
    ],
    // Directory for saving class maps
    'storage_path' => $basePath.'/protectedDir/'
    
];
Autoloader::register(
            $autoloaderConfig['prepend'] ?? false,
            $autoloaderConfig['scan_dirs'],
            $autoloaderConfig['storage_path']
        );