PHPackages                             starbug/resource-locator - 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. starbug/resource-locator

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

starbug/resource-locator
========================

Locate files and classes from a list of modules.

v0.9.1(5y ago)04.8k1GPL-3.0-or-laterPHP

Since Oct 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/cogentParadigm/starbug-resource-locator)[ Packagist](https://packagist.org/packages/starbug/resource-locator)[ RSS](/packages/starbug-resource-locator/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

Resource Locator
================

[](#resource-locator)

The ResourceLocator class locates files and classes within directories and namespaces.

Basic example:

```
use Starbug\ResourceLocator\ResourceLocator;

$namespaces = [
  "Starbug\Core",
  "Starbug\Log",
  "Starbug\State",
  "Starbug\Var"
]
$paths = [
  "core",
  "modules/log",
  "modules/state",
  "var"
]

$locator = new ResourceLocator(dirname(__FILE__));
$locator->setNamespaces($namespaces);
$locator->setPaths($paths);

// This will check each module for a file at the path
// "etc/config.json" and return an array of matches.
// For instance, if core and log both contained the file,
// we would get:
// [
//   "core/etc/config.json",
//   "modules/log/config.json"
// ]
$locator->locate("config.json", "etc");

// This will check each module namespace and return
// the first one with a class named AdminController.
// For example, Starbug\Log\AdminController.
$locator->className("admin", "Controller");
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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 ~43 days

Total

3

Last Release

1988d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46478?v=4)[Cogent](/maintainers/cogent)[@cogent](https://github.com/cogent)

---

Top Contributors

[![cogentParadigm](https://avatars.githubusercontent.com/u/78707?v=4)](https://github.com/cogentParadigm "cogentParadigm (3 commits)")

### Embed Badge

![Health badge](/badges/starbug-resource-locator/health.svg)

```
[![Health](https://phpackages.com/badges/starbug-resource-locator/health.svg)](https://phpackages.com/packages/starbug-resource-locator)
```

###  Alternatives

[php-tuf/composer-stager

Stages Composer commands so they can be safely run on a production codebase.

174.5M6](/packages/php-tuf-composer-stager)

PHPackages © 2026

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