PHP code example of rooc / psr4_auto_loader
1. Go to this page and download the library: Download rooc/psr4_auto_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/ */
rooc / psr4_auto_loader example snippets
$autoLoader = new \Rooc\PSR4AutoLoader\PSR4AutoLoader('./src', 'App');
$autoLoader->register();
use Rooc\PSR4AutoLoader\PSR4AutoLoader;
// Load classes
(new PSR4AutoLoader('./Classes', 'App'))->register();
// Load interfaces
(new PSR4AutoLoader('./Interfaces', 'App'))->register();