PHPackages                             ldrahnik/url-matcher - 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. ldrahnik/url-matcher

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

ldrahnik/url-matcher
====================

v2.0(11y ago)01.5k2BSD-3-ClausePHPPHP &gt;= 5.4

Since Mar 30Pushed 8y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (3)Used By (2)

ldrahnik/url-matcher
====================

[](#ldrahnikurl-matcher)

[![Build Status](https://camo.githubusercontent.com/0c97fa2c753b8a06f2f602dd17672c23d0aa6b79cc792b77f2c42eb9bde751c6/68747470733a2f2f7472617669732d63692e6f72672f6c647261686e696b2f75726c2d6d6174636865722e737667)](https://travis-ci.org/ldrahnik/url-matcher)[![Latest stable](https://camo.githubusercontent.com/313b373df0aaec30a213728079f0b86a449eb30edde937ff7b46b0e92e2030b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c647261686e696b2f75726c2d6d6174636865722e737667)](https://packagist.org/packages/ldrahnik/url-matcher)[![Downloads total](https://camo.githubusercontent.com/f85459abe050d0948bbb48615a80046ef089662f52119caa7da565b29fbb14db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c647261686e696b2f75726c2d6d6174636865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ldrahnik/url-matcher)

Requirements
------------

[](#requirements)

ldrahnik/url-matcher requires PHP 5.4 or higher.

- [Nette Framework](https://github.com/nette/nette)

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

[](#installation)

Install url-matcher to your project using [Composer](http://getcomposer.org/):

```
$ composer require ldrahnik/url-matcher
```

Usage
-----

[](#usage)

create url

```
	$patterns = [
		'lang' => 'cz',
		'presenter' => 'home',
		'action' => 4
	];
	$mask = '[/]/';
	$matcher = new Matcher($mask, $patterns);

    	$results = $matcher->parse();
    	/*array [
		 'home/4',
		 'cz/home/4',
	];*/
```

confirm url

```
	$mask = '[/][/]';
	$matcher = new Matcher($mask);

	$result = $matcher->match('en/admin');
	// true
```

Examples
--------

[](#examples)

```
	$mask = 'root///.latte';

	$matcher = new UrlMatcher\Matcher($mask, [
		'folder' => '*',
		'subfolder' => 'foo',
		'file' => '*'
	]);

	$mask = $matcher->parse();
	// root/*/foo/*.latte

	foreach (glob($mask) as $filename) {
		echo basename($filename);
	}
```

Configuration
-------------

[](#configuration)

```
	$default = [
		'separator_lft' => '',
		'optional_lft' => '[',
		'optional_rgt' => ']'
	];
	$matcher = new Matcher(..., ..., $default);
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

4027d ago

Major Versions

v1.0 → v2.02015-05-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/61ee1ce0e850961847ab4c4356bf0506d987f9beaa04da675aa9c27ae873d254?d=identicon)[ldrahnik](/maintainers/ldrahnik)

---

Top Contributors

[![ldrahnik](https://avatars.githubusercontent.com/u/3233644?v=4)](https://github.com/ldrahnik "ldrahnik (15 commits)")

---

Tags

nettepackagephp

### Embed Badge

![Health badge](/badges/ldrahnik-url-matcher/health.svg)

```
[![Health](https://phpackages.com/badges/ldrahnik-url-matcher/health.svg)](https://phpackages.com/packages/ldrahnik-url-matcher)
```

###  Alternatives

[vojtech-dobes/nette-forms-gpspicker

Google Maps based picker of coordinates for Nette Framework.

2456.6k](/packages/vojtech-dobes-nette-forms-gpspicker)[jkuchar/multiplefileupload

Multiple upload form control for Nette framework.

104.4k1](/packages/jkuchar-multiplefileupload)

PHPackages © 2026

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