Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextras/static-router
Simple static router for Nette Framework
https://github.com/nextras/static-router
nette-component nextras routing
Last synced: 24 days ago
JSON representation
Simple static router for Nette Framework
- Host: GitHub
- URL: https://github.com/nextras/static-router
- Owner: nextras
- Created: 2014-10-05T09:20:31.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-12-20T14:55:17.000Z (almost 4 years ago)
- Last Synced: 2024-04-25T11:41:20.517Z (7 months ago)
- Topics: nette-component, nextras, routing
- Language: PHP
- Homepage: https://nextras.org/static-router
- Size: 28.3 KB
- Stars: 25
- Watchers: 9
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Nextras StaticRouter
====================[![Build Status](https://github.com/nextras/static-router/workflows/QA/badge.svg?branch=master)](https://github.com/nextras/static-router/actions?query=workflow%3AQA+branch%3Amaster)
[![Downloads this Month](https://img.shields.io/packagist/dm/nextras/static-router.svg?style=flat)](https://packagist.org/packages/nextras/static-router)
[![Stable Version](https://img.shields.io/packagist/v/nextras/static-router.svg?style=flat)](https://packagist.org/packages/nextras/static-router)### Installation
Add to your composer.json:
```
"require": {
"nextras/static-router": "~2.0"
}
```### Example
```php
use Nextras\Routing\StaticRouter;$router = new StaticRouter(['Homepage:default' => 'index.php'], StaticRouter::ONE_WAY);
$router = new StaticRouter([
'Homepage:default' => '',
'Auth:signIn' => 'sign-in',
'Auth:signOut' => 'sign-out',
'Auth:signUp' => 'sign-up',
]);
```