Download the PHP package memcrab/exceptions without Composer
On this page you can find all versions of the php package memcrab/exceptions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download memcrab/exceptions
More information about memcrab/exceptions
Files in memcrab/exceptions
Download memcrab/exceptions
More information about memcrab/exceptions
Files in memcrab/exceptions
Vendor memcrab
Package exceptions
Short Description PHP based Exceptions lib for memCrab Core API
License MIT
Homepage http://memcrab.com
Package exceptions
Short Description PHP based Exceptions lib for memCrab Core API
License MIT
Homepage http://memcrab.com
Please rate this library. Is it a good library?
Informations about the package exceptions
PHP Router as Composer Library
Status
It's php router based on yaml configuration file and support regular expressions in each route condition. Thats help build more accurate routes with only numbers in part of url or with required part of word etc.
Features
- Support RegExp in any kind of route
- Support multiple routings for single url throw different request methods (POST, GET, PUT, DELETE, ...)
- Support full url or just request uri
- All configurations in simple YAML file
- Each route can return already named params (as many params as you want, or as you have in Regular Expression)
- High performance yaml parse throw using updated pecl yaml-ext 2.0.0 for php 7.0
- Strict standart coding with full Typing of params and returns (by php 7.1)
- PSR-4 autoloading compliant structure
- Unit-Testing with PHPUnit
- Easy to use to any framework
Install
Dependencies
php extension YAML:
-
for Ubuntu/Debian
- for OS X
Usage
- init Router:
memCrab\Router()
- load routes:
->loadRoutesFromYaml(string $filePath)
- $filePath - Path to yaml files with routes
- run matching:
->matchRoute(string $url, string $method)
- $url - URL (
http://example.com/posts
) or just request URI of page (/post
) - $method - http request method
- $url - URL (
- use your router data with:
- getService() - return component that we call
- getAction() - return action that will be run from component
- getParams() - return route regExp params
Yaml Config Example
Run Example
TODOS
- [ ] Add support for suffixes - right part of uri that not involved in routing like .html, .php, last "/", etc
- [ ] Add support for prefixes - left part of uri that not involved in routing like lang part (uk/us/fr/ru) or geo part (europe/asia), etc
MIT Licensed
All versions of exceptions with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1
The package memcrab/exceptions contains the following files
Loading the files please wait ....