Download the PHP package dlunire/dlroute without Composer
On this page you can find all versions of the php package dlunire/dlroute. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dlunire/dlroute
More information about dlunire/dlroute
Files in dlunire/dlroute
Package dlroute
Short Description Sistema de rutas simple, eficiente y flexible. Úsalo con DLUnire o intégralo fácilmente en cualquier proyecto PHP
License MIT
Informations about the package dlroute
DLRoute – PHP Routing System
DLRoute is a simple, flexible, and efficient routing system designed for web applications in PHP. It provides advanced support for data filtering, parameter types, and clean integration with your application.
🌐 Descripción en Español
DLRoute es un sistema de enrutamiento diseñado para facilitar la gestión de rutas y direcciones URL en aplicaciones web.
Actualmente, permite filtrar por tipos de datos o expresiones regulares. También admite contenido enviado en formato JSON directamente en el cuerpo (body
) de la petición.
✅ Características
- Definición de rutas simples y complejas.
- Manejo de métodos
HTTP
:GET
,POST
,PUT
,PATCH
,DELETE
. - Soporte para parámetros dinámicos y tipados.
- Validación por tipo o expresión regular.
- Uso de controladores o funciones anónimas (
callbacks
). - Integración flexible con proyectos PHP nativos o con el framework DLUnire.
💾 Instalación
Ubica tu archivo principal en una carpeta pública (como public/
o html_public
). Define las rutas y al final, ejecuta:
✏️ Sintaxis
📌 Ejemplos
Rutas básicas con controlador:
Definición del controlador:
Rutas con tipos:
O con expresión regular:
Tipos admitidos
Uso de callbacks:
🌍 English Description
DLRoute is a routing system designed to simplify URL management in modern PHP applications. It supports type filtering and regular expressions, and accepts JSON payloads directly from the body.
✅ Features
- Simple and complex route definitions.
- Supports
GET
,POST
,PUT
,PATCH
,DELETE
HTTP methods. - Dynamic route parameters with type filtering.
- Regular expression-based parameter validation.
- Supports controllers and callbacks.
- Easily integrates into native PHP or the DLUnire framework.
💾 Installation
Your index.php
should be placed in a public folder (e.g., public/
). Remember to execute all defined routes:
✏️ Syntax
📌 Examples
Controller usage:
Controller structure:
With parameter type filtering:
Callback usage:
If an array or object is returned, DLRoute will automatically send a JSON response.