PHPackages                             fyre/loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fyre/loader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fyre/loader
===========

An autoloader library.

v4.0.2(8mo ago)0186↓83.3%3MITPHP

Since Oct 26Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/elusivecodes/FyreLoader)[ Packagist](https://packagist.org/packages/fyre/loader)[ RSS](/packages/fyre-loader/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (5)Versions (31)Used By (3)

FyreLoader
==========

[](#fyreloader)

**FyreLoader** is a free, open-source autoloader library for *PHP*.

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Methods](#methods)

Installation
------------

[](#installation)

**Using Composer**

```
composer require fyre/loader

```

In PHP:

```
use Fyre\Loader\Loader;
```

Basic Usage
-----------

[](#basic-usage)

```
$loader = new Loader();
```

**Autoloading**

It is recommended to bind the *Loader* to the [*Container*](https://github.com/elusivecodes/FyreContainer) as a singleton.

```
$container->singleton(Loader::class);
```

Methods
-------

[](#methods)

**Add Class Map**

Add a class map.

- `$classMap` is an array containing the class map.

```
$loader->addClassMap($classMap);
```

**Add Namespaces**

Add namespaces.

- `$namespaces` is an array containing the namespaces where the key is the namespace prefix and the value is the path.

```
$loader->addNamespaces($namespaces);
```

**Clear**

Clear the auto loader.

```
$loader->clear();
```

**Get Class Map**

Get the class map.

```
$classMap = $loader->getClassMap();
```

**Get Namespace**

Get a namespace.

- `$prefix` is a string representing the namespace prefix.

```
$paths = $loader->getNamespace($prefix);
```

**Get Namespace Paths**

Get all paths for a namespace.

- `$prefix` is a string representing the namespace prefix.

```
$paths = $loader->getNamespacePaths($prefix);
```

**Get Namespaces**

Get the namespaces.

```
$namespaces = $loader->getNamespaces();
```

**Has Namespace**

Determine whether a namespace exists.

- `$prefix` is a string representing the namespace prefix.

```
$hasNamespace = $loader->hasNamespace($prefix);
```

**Load Composer**

Load composer.

- `$composerPath` is a string representing the composer autoload path.

```
$loader->loadComposer($composerPath);
```

**Register**

Register the autoloader.

```
$loader->register();
```

**Remove Class**

Remove a class.

- `$className` is a string representing the class name.

```
$loader->removeClass($className);
```

**Remove Namespace**

Remove a namespace.

- `$prefix` is a string representing the namespace prefix.

```
$loader->removeNamespace($prefix);
```

**Unregister**

Unregister the autoloader.

```
$loader->unregister();
```

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance62

Regular maintenance activity

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~50 days

Recently: every ~22 days

Total

30

Last Release

240d ago

Major Versions

v1.0.8 → v2.02023-07-16

v2.0.7 → v3.02024-10-28

v3.3.4 → v4.02025-10-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/fad81fd5941e3a637c8a5749d05ae3ed9314d5e2fee57f59c3d9ec3b41259c6b?d=identicon)[elusivecodes](/maintainers/elusivecodes)

---

Top Contributors

[![elusivecodes](https://avatars.githubusercontent.com/u/18050480?v=4)](https://github.com/elusivecodes "elusivecodes (22 commits)")

---

Tags

autoloaderloaderphppsr4

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/fyre-loader/health.svg)

```
[![Health](https://phpackages.com/badges/fyre-loader/health.svg)](https://phpackages.com/packages/fyre-loader)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
