PHPackages                             poirot/pathuri - 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. poirot/pathuri

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

poirot/pathuri
==============

257PHP

Since Sep 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/phPoirot/PathUri)[ Packagist](https://packagist.org/packages/poirot/pathuri)[ RSS](/packages/poirot-pathuri/feed)WikiDiscussions devel Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Poirot\\PathUri
===============

[](#poirotpathuri)

Powerful while Remaining Simple to use library to ease URL parsing and editing in PHP.

General Usage
-------------

[](#general-usage)

**PathJoinedUri**

Basic Path Interfaces iPathJoinedUri

```
### Build object from construct ---------------------------------------------------
$joinedPath = new PathJoinUri([
    # (!) when you pass a path on construct
    #     you have to set separator
    'path' => '/var/www/html/',                        #  ['', 'var', 'www', 'html'],              #  '/'
]);

### Build Existing Object -------------------------------------------------------
$newPath = (new PathJoinUri)->setSeparator('\\');
                                   # ^ you have to set separator before parse()
$parsedUri = $newPath->parse('\\..\\htdocs\\project\\');
         # = ['path' => ['', '..', 'htdocs', 'project']]

$newPath->fromArray($parsedUri);

## print out path
echo $newPath
    ->toString()
    .'';
# output : \..\htdocs\project

### Append/Prepend Paths --------------------------------------------------------
$joinedPath->append($newPath);

echo $joinedPath->toString().'';;
# output: /var/www/html/../htdocs/project

# normalize output
echo $joinedPath->normalize()->toString().'';;
# output: /var/www/htdocs/project

# (!) Paths starting with "../" turning path into relative on normalize
$joinedPath->prepend(new PathJoinUri(['path' => '/../relative']));
echo $joinedPath->toString().'';
# output: /../relative/var/www/htdocs/project
echo $joinedPath->normalize()->toString().'';
# output: relative/var/www/htdocs/project
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f784f9dfb58e36b6a876f3057e5664bb904af71d30bb2023583118138dffe9a?d=identicon)[Payam](/maintainers/Payam)

---

Top Contributors

[![E1101](https://avatars.githubusercontent.com/u/427575?v=4)](https://github.com/E1101 "E1101 (105 commits)")

### Embed Badge

![Health badge](/badges/poirot-pathuri/health.svg)

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

###  Alternatives

[novus/nvd3

A reusable charting library written in d3.js

7.2k207.7k2](/packages/novus-nvd3)[aimeos/ai-controller-frontend

Aimeos business controller logic for frontend

966339.3k12](/packages/aimeos-ai-controller-frontend)[pugx/autocompleter-bundle

Add an autocomplete type to forms

93861.6k3](/packages/pugx-autocompleter-bundle)[innmind/immutable

Immutable PHP primitive wrappers

75218.0k74](/packages/innmind-immutable)[beacon-hq/bag

A comprehensive immutable value objects implementation

1789.1k3](/packages/beacon-hq-bag)[rcknr/nova-multiselect-filter

A Laravel Nova filter that allows multiple selection.

26275.0k2](/packages/rcknr-nova-multiselect-filter)

PHPackages © 2026

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