Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abgeo/webii-hw02-routing
https://github.com/abgeo/webii-hw02-routing
hw request response routing web2
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/abgeo/webii-hw02-routing
- Owner: ABGEO
- License: mit
- Created: 2019-03-02T19:17:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-05T18:55:34.000Z (almost 6 years ago)
- Last Synced: 2024-11-05T21:47:40.475Z (about 2 months ago)
- Topics: hw, request, response, routing, web2
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WEBII-HW02-Routing
## IncludingInclude Autoloader
```php
require_once __DIR__ . '/Services/autoloader.php';
```Import class
```php
use web2hw\Router;
```Create routes file
The routes file is a json file, where object key is route unique name.
Each route must have **path**, **method** and **action** keys. Homepage route example:
```json
{
"homepage": {
"path": "/",
"method": "GET",
"action": "web2hw\\DefaultController::index"
}
}
```