PHPackages                             ivrok/urlmanager - 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. ivrok/urlmanager

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

ivrok/urlmanager
================

URLManager: Efficient PHP URL parsing and management with classes for component handling and URL parsing.

1.0.2(2y ago)014MITPHPPHP &gt;=7.4.0

Since May 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ivrok/URLManager)[ Packagist](https://packagist.org/packages/ivrok/urlmanager)[ RSS](/packages/ivrok-urlmanager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

URLManager
==========

[](#urlmanager)

`URLManager` is a PHP package designed to facilitate the parsing and management of URLs. It includes two classes, `URL` and `URLHelper`, to handle URL components and parsing respectively.

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

[](#installation)

You can install the package via Composer:

```
composer require ivrok/urlmanager
```

Usage
-----

[](#usage)

### URL Class

[](#url-class)

The `URL` class provides methods to set and get URL components such as protocol, domain, and path. It also allows you to add query parameters.

```
use Ivrok\URLManager\URL;

$url = new URL('example.com');
$url->setHTTPS();
$url->setPath('/index.php');
$url->addQueryParameter('key', 'value');

echo $url; // Outputs: https://example.com/index.php?key=value
```

### URLHelper Class

[](#urlhelper-class)

The URLHelper class includes methods to interact with the URL object:

```
use Ivrok\URLManager\URLHelper;

$url = URLHelper::parseUrl('https://www.example.com/index.php?key=value');

// Check if a specific query exists
echo URLHelper::hasQuery($url, 'key'); // Outputs: true

// Check if the URL path matches a specific path
echo URLHelper::isPath($url, '/about'); // Outputs: true

// Check if the URL path includes a specific string
echo URLHelper::isPathInclude($url, 'ab'); // Outputs: true

// Check if the domain matches
echo URLHelper::isDomain($url, 'www.example.com'); // Outputs: true

// Check if the domain and top domain matches
echo URLHelper::isDomainOrTopDomain($url, 'example.com'); // Outputs: true
```

Features
--------

[](#features)

- Set and get URL components like domain, path, and protocol.
- Add single or multiple query parameters to a URL.
- Parse a URL string into a `URL` object.

License
-------

[](#license)

URLManager is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Total

2

Last Release

738d ago

### Community

Maintainers

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

---

Top Contributors

[![ivrok](https://avatars.githubusercontent.com/u/8004872?v=4)](https://github.com/ivrok "ivrok (2 commits)")

### Embed Badge

![Health badge](/badges/ivrok-urlmanager/health.svg)

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

###  Alternatives

[yahnis-elsts/admin-notices

A utility library for WordPress plugins that makes it easier to create admin notices. Supports persistently dismissible notices.

311.1k](/packages/yahnis-elsts-admin-notices)[jahvi/magento2-copy-theme-override

Magento 2 command to automatically copy files into active theme

124.5k](/packages/jahvi-magento2-copy-theme-override)

PHPackages © 2026

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