All Projects → dannyvankooten → Altorouter

dannyvankooten / Altorouter

Licence: mit
PHP routing class. Lightweight yet flexible. Supports REST, dynamic and reversed routing.

Labels

Projects that are alternatives of or similar to Altorouter

I18n Module
i18n for Nuxt
Stars: ✭ 808 (-23.7%)
Mutual labels:  routing
Routing
The Routing component maps an HTTP request to a set of configuration variables.
Stars: ✭ 7,080 (+568.56%)
Mutual labels:  routing
Url Mapper
Take a URL and map to functions, parsing params
Stars: ✭ 39 (-96.32%)
Mutual labels:  routing
Reitit
A fast data-driven router for Clojure/Script
Stars: ✭ 892 (-15.77%)
Mutual labels:  routing
Rssh
route ssh through a series of hosts (for if you / the servers are behind firewalls etc)
Stars: ✭ 8 (-99.24%)
Mutual labels:  routing
Go Bootstrap
Easy way to bootstrap a web server in Go (Routing|Middleware|Https)
Stars: ✭ 27 (-97.45%)
Mutual labels:  routing
Clash Rules
🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 客户端。
Stars: ✭ 706 (-33.33%)
Mutual labels:  routing
Restify Router
A router interface for restify that lets you aggregate route definitions and apply to a restify server
Stars: ✭ 45 (-95.75%)
Mutual labels:  routing
Prince
Implementing PopRouting
Stars: ✭ 11 (-98.96%)
Mutual labels:  routing
Kitura
A Swift web framework and HTTP server.
Stars: ✭ 7,533 (+611.33%)
Mutual labels:  routing
Storeon Async Router
Asynchronous router for Storeon. It provides possibility for prefetch the data, lazy load, navigation cancellation, and routes modification on the fly.
Stars: ✭ 22 (-97.92%)
Mutual labels:  routing
Bidi
Bidirectional URI routing
Stars: ✭ 941 (-11.14%)
Mutual labels:  routing
Angular Routing Best Practices
Angular Routing - Best Practices for Enterprise Applications
Stars: ✭ 29 (-97.26%)
Mutual labels:  routing
Zeps Gui
L'interface d'un outil de calcul d'itinéraires, principalement utilisé pour se repérer dans le Netherrail de Zcraft. Nécessite https://github.com/zDevelopers/ZePS-Core .
Stars: ✭ 5 (-99.53%)
Mutual labels:  routing
Yester
A simpler history routing solution 🌹
Stars: ✭ 45 (-95.75%)
Mutual labels:  routing
Pgrouting
Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
Stars: ✭ 804 (-24.08%)
Mutual labels:  routing
React Router Component
Declarative router component for React.
Stars: ✭ 879 (-17%)
Mutual labels:  routing
Siler
⚡ Flat-files and plain-old PHP functions rockin'on as a set of general purpose high-level abstractions.
Stars: ✭ 1,056 (-0.28%)
Mutual labels:  routing
Yii2 Nested Rest
Nested routing support to the Yii RESTful API framework
Stars: ✭ 45 (-95.75%)
Mutual labels:  routing
Laravel Guided Image
Simplified and ready image manipulation for Laravel through intervention image.
Stars: ✭ 32 (-96.98%)
Mutual labels:  routing

AltoRouter Build Status Latest Stable Version License Code Climate Test Coverage

AltoRouter is a small but powerful routing class, heavily inspired by klein.php.

$router = new AltoRouter();

// map homepage
$router->map('GET', '/', function() {
    require __DIR__ . '/views/home.php';
});

// dynamic named route
$router->map('GET|POST', '/users/[i:id]/', function($id) {
  $user = .....
  require __DIR__ . '/views/user/details.php';
}, 'user-details');

// echo URL to user-details page for ID 5
echo $router->generate('user-details', ['id' => 5]); // Output: "/users/5"

Features

  • Can be used with all HTTP Methods
  • Dynamic routing with named route parameters
  • Reversed routing
  • Flexible regular expression routing (inspired by Sinatra)
  • Custom regexes

Getting started

You need PHP >= 5.6 to use AltoRouter, although we highly recommend you use an officially supported PHP version that is not EOL.

Contributors

License

MIT License

Copyright (c) 2012 Danny van Kooten [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].