Download the PHP package joseluisq/ruta without Composer
On this page you can find all versions of the php package joseluisq/ruta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download joseluisq/ruta
More information about joseluisq/ruta
Files in joseluisq/ruta
Package ruta
Short Description A lightweight HTTP routing library for PHP without external dependencies
License Apache-2.0 MIT
Informations about the package ruta
Ruta
A lightweight HTTP routing library for PHP. (WIP)
Features
- [x] HTTP status codes
- [x] HTTP Methods
- [x] HTTP Headers
- [x] HTTP Requests
- [x] Handle
multipart/form-data
request data - [x] Handle
x-www-form-urlencoded
request data - [x] Handle
application/xml
request data - [x] Handle
application/json
request data - [x] Handle
query
URI request params - [x] Access request
path
andheaders
- [x] Handle
- [x] HTTP Responses
- [x] HTML, JSON, XML or Text responses
- [x] HTTP redirections
- [x] HTTP Routing
- [x] Routes with placeholder arguments:
/abc/{some}
- [x] Handle multiple valid HTTP methods
- [x] Handle any valid HTTP method
- [x] Handle not match routes (404s)
- [x] Support callback or class/method style
- [x] Optional and order-insensitive arguments on callback or class/method handlers
- [x] Regular expressions support:
/abc/regex(id=^[0-9]+$)
- [ ] Optional route arguments:
/abc/{some?}
- [ ] Fallback routes
- [ ] Route's cache
- [x] Routes with placeholder arguments:
- [x] Middlewares
- [x] Inspect or filter valid requests before routing
- [ ] Inspect or filter valid requests after routing
See Leap micro-framework based on Ruta.
Requirements
PHP 8.0 or newer.
Install
Install via Composer
Usage
Code example
File: example/nginx/public/index.php
Now navigate for example to http://localhost:8088/home/hola
Contributions
Feel free to send a pull request or file some issue.
Contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in current work by you, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions.
Feel free to send some Pull request or issue.
License
This work is primarily distributed under the terms of both the Apache License (Version 2.0).
© 2021-present Jose Quintana