PHPackages                             toxygene/simple-uri-template - 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. toxygene/simple-uri-template

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

toxygene/simple-uri-template
============================

2.0.3(10y ago)013PHP

Since Aug 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/toxygene/simple-uri-template)[ Packagist](https://packagist.org/packages/toxygene/simple-uri-template)[ RSS](/packages/toxygene-simple-uri-template/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

Simple URI Template
===================

[](#simple-uri-template)

A simple URI template language with a lexer and parsers to output a regular expression or a complete URI.

The primary use case is for assembling and matching path-based routes.

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

[](#installation)

`composer install toxygene/simple-uri-template`

Language Definition
-------------------

[](#language-definition)

```
   TEMPLATE ::= ( PLACEHOLDER | LITERAL ) { TEMPLATE } *
PLACEHOLDER ::= "{" IDENTIFIER "}"
 IDENTIFIER ::= [a-zA-Z][a-zA-Z0-9]*
    LITERAL ::= [^{}]+

```

Regex Examples
--------------

[](#regex-examples)

```
use Toxygene\SimpleUriTemplate\Lexer;
use Toxygene\SimpleUriTemplate\RegexParser;

$lexer = new Lexer();
$parser = new RegexParser($lexer);

echo $parser->parse('/one/{two}/three'); // #^/one/(?P.+?)/three$#
```

URI Examples
------------

[](#uri-examples)

```
use Toxygene\SimpleUriTemplate\Lexer;
use Toxygene\SimpleUriTemplate\UriParser;

$lexer = new Lexer();
$parser = new UriParser($lexer);

echo $parser->parse('/one/{two}/three', ['two' => 2]); // /one/2/three
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

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

Total

5

Last Release

3672d ago

Major Versions

1.0.0 → 2.0.02016-06-13

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/350210?v=4)[Justin Hendrickson](/maintainers/toxygene)[@toxygene](https://github.com/toxygene)

---

Top Contributors

[![toxygene](https://avatars.githubusercontent.com/u/350210?v=4)](https://github.com/toxygene "toxygene (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/toxygene-simple-uri-template/health.svg)

```
[![Health](https://phpackages.com/badges/toxygene-simple-uri-template/health.svg)](https://phpackages.com/packages/toxygene-simple-uri-template)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k300.5M7.5k](/packages/doctrine-orm)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[loupe/loupe

A full text search engine with tokenization, stemming, typo tolerance, filters and geo support based on only PHP and SQLite

508254.9k27](/packages/loupe-loupe)[typo3/cms-core

TYPO3 CMS Core

3713.2M5.1k](/packages/typo3-cms-core)

PHPackages © 2026

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