iziphp/autoloader

Skeleton to create a composer library

Installs: 358

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

v1.0.0 2023-06-26 09:23 UTC

This package is auto-updated.

Last update: 2024-04-26 10:55:33 UTC


README

PSR-4 compatible Autoloader. This is the updated version of the example autoloader from the PSR-4 specification.

Installation

composer require iziphp/autoloader

Usage

// Instantiate the loader
$loader = new \Easy\Autoloader\Autoloader();

// Add namespaces to autoload
$loader->appendNamespace("Components", "components"); # Root source
$loader->prependNamespace(null, "src"); # Root source

// Register the autoloader
$loader->register();