Download the PHP package linkorb/data-router without Composer
On this page you can find all versions of the php package linkorb/data-router. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download linkorb/data-router
More information about linkorb/data-router
Files in linkorb/data-router
Package data-router
Short Description DataRouter: library for routing arbitrary data based on hierarchical rules
License MIT
Homepage http://www.github.com/linkorb/data-router
Informations about the package data-router
DataRouter
Simple library to route data based on nested routing rules
Use-cases:
- Advanced alert/support routing based on schedules, escalation, priorities, etc
- Q/A routing
- Self-service
- On-call scheduling
Concepts
Using the DataRouter library you create a nested tree structure of Routes.
Every Route has a name, expression (for matching), and optionally child routes and output data.
The expressions are evaluated hierarchically using the Symfony Expression Language Component allowing for arbitrarily complex routing rules.
You can pass in your own "ExpressionLanguage" instance to support your own custom functions to enrich your expressions.
Example
Check example/example.php
for a simple example for a common usage scenario:
- Loading routes from a YAML config file (included
test-routes.yaml
) - Instantiating a custom ExpressionLanguage instance with a custom method
- Instantiating a Router
- Routing / output
- Logging / debugging
License
MIT. Please refer to the license file for details.
Brought to you by the LinkORB Engineering team
Check out our other projects at linkorb.com/engineering.
Btw, we're hiring!