PHPackages                             xfirst/router-trie - 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. [Framework](/categories/framework)
4. /
5. xfirst/router-trie

ActiveLibrary[Framework](/categories/framework)

xfirst/router-trie
==================

Sistema de enrutamiento basado en Trie, adaptable a Laravel, Symfony y CakePHP.

v1.0.0(1y ago)03MITPHPPHP ^8.1

Since Apr 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/XFIRSTAR/Xfirst_Module_Trie)[ Packagist](https://packagist.org/packages/xfirst/router-trie)[ RSS](/packages/xfirst-router-trie/feed)WikiDiscussions v1.0.0 Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Extensión del/para el Framework XFIRTS
======================================

[](#extensión-delpara-el-framework-xfirts)

Sistema de enrutamiento basado en Trie, adaptable a Laravel, Symfony y CakePHP

RouteTrieAdapter
================

[](#routetrieadapter)

Sistema de rutas optimizado basado en Trie, adaptable a múltiples frameworks PHP como **Laravel**, **Symfony**, y **CakePHP**.

---

🧪Ejemplo de Uso
---------------

[](#ejemplo-de-uso)

**Laravel:**

use Modulo\\Export\\Src\\Laravel\\LaravelServicesProvider; use Modulo\\Export\\Src\\Core\\Trie as RouteTrie;

$trie = new RouteTrie('api'); $trie-&gt;insert('GET', '/usuarios', \[App\\Http\\Controllers\\UsuarioController::class, 'index'\]);

$adapter = new RouteTrieLaravelAdapter(); $adapter-&gt;mount($trie); // Registra las rutas en Laravel

**Symfony:**

use Modulo\\Export\\Src\\Symfony\\TrieSymfonyAdapter; use Modulo\\Export\\Src\\Core\\Trie as RouteTrie;

$trie = new RouteTrie('web'); $trie-&gt;insert('GET', '/productos/{id}', \[ProductoController::class, 'ver'\]);

$adapter = new TrieSymfonyAdapter(); $routes = $adapter-&gt;mount($trie); // Devuelve RouteCollection

**CakePHP:**

use Modulo\\Export\\Src\\CakePHP\\TrieCakeAdapter; use Modulo\\Export\\Src\\Core\\Trie as RouteTrie;

$trie = new RouteTrie('admin'); $trie-&gt;insert('POST', '/usuarios/crear', \['Usuarios', 'crear'\]);

$adapter = new TrieCakeAdapter(); $adapter-&gt;mount($trie); // Usa Router::connect() internamente

⚙️ Cache Contextual Dinámico
----------------------------

[](#️-cache-contextual-dinámico)

Cada instancia de Trie crea y guarda un archivo de caché único por contexto:

/storage/cache/rutas/api.cache /storage/cache/rutas/web.cache /storage/cache/rutas/{framework}.cache

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance48

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

380d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59e298e664e6aca1a59234746997b3cac4b4d1f1cd459b5ffef3799316173e23?d=identicon)[XFIRSTAR](/maintainers/XFIRSTAR)

---

Top Contributors

[![XFIRSTAR](https://avatars.githubusercontent.com/u/167824556?v=4)](https://github.com/XFIRSTAR "XFIRSTAR (17 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/xfirst-router-trie/health.svg)

```
[![Health](https://phpackages.com/badges/xfirst-router-trie/health.svg)](https://phpackages.com/packages/xfirst-router-trie)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M191](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M256](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M593](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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