Download the PHP package initphp/router without Composer
On this page you can find all versions of the php package initphp/router. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package router
InitPHP Router
This is an open source library that lets you create and manage advanced routes for HTTP requests.
Features
- Full support for GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD and ANY request methods.
- Variable request methods with (Laravel-like)
$_REQUEST['_method']
. (Default is off, optionally can be activated) - Controller support. (HomeController@about or HomeController::about)
- Middleware/Filter (before and after) support.
- Static and dynamic route patterns.
- Ability to create custom parameter pattern.
- Namespace support.
- Route grouping support.
- Domain-based routing support.
- Ability to define custom 404 errors
- Ability to name routes
- Ability to call a class in (Symfony-like) callable functions or parameters of controller methods.
- Routing by request ports.
- Routing by client IP address (Via
$_SERVER['REMOTE_ADDR']
. Locally, this value can be something like::1
or127.0.0.1
.) - A directory path can be defined as a virtual link.
Requirements
- PHP 7.2 or later
- Apache is; AllowOverride All should be set to and mod_rewrite should be on.
- Any library that implements the Psr-7 HTTP Message Interface and an emitter written for Psr-7. For example; InitPHP HTTP Library
Installation
Is Apache .htaccess
Is NGINX;
Configuration
Usage
The following example uses the InitPHP HTTP library. If you wish, you can use this library using the command below, or you can perform similar operations using another library that uses the Psr-7 HTTP Message interface.
See the Wiki for detailed documentation.
Getting Help
If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.
Getting Involved
All contributions to this project will be published under the MIT License. By submitting a pull request or filing a bug, issue, or feature request, you are agreeing to comply with this waiver of copyright interest.
There are two primary ways to help:
- Using the issue tracker, and
- Changing the code-base.
Using the issue tracker
Use the issue tracker to suggest feature requests, report bugs, and ask questions. This is also a great way to connect with the developers of the project as well as others who are interested in this solution.
Use the issue tracker to find ways to contribute. Find a bug or a feature, mention in the issue that you will take on that effort, then follow the Changing the code-base guidance below.
Changing the code-base
Generally speaking, you should fork this repository, make changes in your own fork, and then submit a pull request. All new code should have associated unit tests that validate implemented features and the presence or lack of defects. Additionally, the code should follow any stylistic and architectural guidelines prescribed by the project. In the absence of such guidelines, mimic the styles and patterns in the existing code-base.
Credits
License
Copyright © 2022 MIT Licence