Skip to content

jason-napolitano/PSR4-Autoloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

PSR4-Autoloader

PSR-4 Autoloader Package. Requires PHP >=7.4

Usage

require 'src/Autoloader.php';

// Register the autoloader
Autoloader::register();

Then register new namespaces and classmaps in their respective $psr4 and $classmap arrays inside of src/Autoloader.php. Below is the format to follow:

$psr4 = [
  'NamespaceName' => 'path/to/directory'
];

$classmap = [
  '\Namespace\Classname' => 'path/to/class/file.php', // Using the '.php` extension
  '\Namespace\Classname' => 'path/to/class/file'      // Without the '.php` extension
];

About

PSR-4 Autoloader Package

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages