PHPackages                             opxcore/pathset - 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. opxcore/pathset

ActiveLibrary

opxcore/pathset
===============

OpxCore path set component.

1.0.5(5y ago)012MITPHPPHP &gt;=7.4

Since Jun 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/opxcore/pathset)[ Packagist](https://packagist.org/packages/opxcore/pathset)[ RSS](/packages/opxcore-pathset/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Path set
========

[](#path-set)

[![Build Status](https://camo.githubusercontent.com/1eb1b10b335cf6ca71c53fc160e5cbb0155747381d9fa958768a50627ea5bd54/68747470733a2f2f7472617669732d63692e6f72672f6f7078636f72652f706174687365742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/opxcore/pathset)[![Coverage Status](https://camo.githubusercontent.com/9825c0763654d47af1828ea8feff7401f04609504a1788f528cbc1944f575c75/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6f7078636f72652f706174687365742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/opxcore/pathset?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/544bdcdd91927c7f5ff271cf9414ad6e6ec1678c5946a517241099a49a09278e/68747470733a2f2f706f7365722e707567782e6f72672f6f7078636f72652f706174687365742f76)](//packagist.org/packages/opxcore/pathset)[![Total Downloads](https://camo.githubusercontent.com/a836d10c8eab7485ec82c09835c7ce8959e702f6267e7a6ea32393d8acbcb86f/68747470733a2f2f706f7365722e707567782e6f72672f6f7078636f72652f706174687365742f646f776e6c6f616473)](//packagist.org/packages/opxcore/pathset)[![License](https://camo.githubusercontent.com/01810a4c3b19a0840b08b053893e5c66795255f78776d3e146dd76def24d2aba/68747470733a2f2f706f7365722e707567782e6f72672f6f7078636f72652f706174687365742f6c6963656e7365)](//packagist.org/packages/opxcore/pathset)

Path set is an abstraction level for defining sets of path collections, e.g. search paths. Each `Path` is associated with primary path and alternates. In the `PathSet` each path is associated with name. Getting set for some name will return array of registered paths for this name in backward order without duplicates. The `'*'` name is a global path set and will be included in all other sets.

Installing
----------

[](#installing)

`composer require opxcore/pathset`

Examples
--------

[](#examples)

Simple usage:

```
$pathSet = new PathSet;
$pathSet->add('name', 'primary', ['alternate_1', 'alternate_2']);
$set = $pathSet->get('name');
// $set = [
//   'alternate_2',
//   'alternate_1',
//   'primary'
// ]

```

Defining with a constructor:

```
$pathSet = new PathSet(['name', ['primary', 'alternate_1', 'alternate_2']]);
$set = $pathSet->get('name');
// $set = [
//   'alternate_2',
//   'alternate_1',
//   'primary'
// ]

```

Usage with a global name:

```
$pathSet = new PathSet;
$pathSet->add('*', 'global_primary', ['global_alternate_1', 'global_alternate_2']);
$pathSet->add('name', 'primary', ['alternate_1', 'alternate_2']);
$set = $pathSet->get('name');
// $set = [
//   'alternate_2',
//   'alternate_1',
//   'primary',
//   'global_alternate_2',
//   'global_alternate_1',
//   'global_primary'
// ]

```

Adding alternates:

```
$pathSet = new PathSet(['name', ['primary', 'alternate_1']]);

...

$pathSet['name']->addAlternates(['alternate_2']);

...

$set = $pathSet->get('name');
// $set = [
//   'alternate_2',
//   'alternate_1',
//   'primary'
// ]

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.2% 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 ~0 days

Total

5

Last Release

2154d ago

### Community

Maintainers

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

---

Top Contributors

[![lozovoyv](https://avatars.githubusercontent.com/u/21274927?v=4)](https://github.com/lozovoyv "lozovoyv (18 commits)")[![opxcore](https://avatars.githubusercontent.com/u/46634185?v=4)](https://github.com/opxcore "opxcore (8 commits)")

---

Tags

opxcorepath-set

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/opxcore-pathset/health.svg)

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

PHPackages © 2026

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