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

ActiveLibrary

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

2.0.3(9y ago)013PHP

Since Aug 27Pushed 9y 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 1mo 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 54% 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

3626d ago

Major Versions

1.0.0 → 2.0.02016-06-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/e0ef1879223954bc1f9929a48400ea9af7383a1352272b86ec37160e44dee24f?d=identicon)[toxygene](/maintainers/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

[egulias/email-validator

A library for validating emails against several RFCs

11.6k691.3M307](/packages/egulias-email-validator)[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58723.9M36](/packages/scienta-doctrine-json-functions)[drupal/core

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

19562.3M1.3k](/packages/drupal-core)[coduo/php-matcher

PHP Matcher enables you to match values with patterns

84312.5M46](/packages/coduo-php-matcher)

PHPackages © 2026

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