DataRouter: library for routing arbitrary data based on hierarchical rules

v1.0.0 2021-08-17 12:32 UTC

This package is not auto-updated.

Last update: 2022-11-23 17:12:15 UTC


Simple library to route data based on nested routing rules


  • Advanced alert/support routing based on schedules, escalation, priorities, etc
  • Q/A routing
  • Self-service
  • On-call scheduling


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.


Check example/example.php for a simple example for a common usage scenario:

  1. Loading routes from a YAML config file (included test-routes.yaml)
  2. Instantiating a custom ExpressionLanguage instance with a custom method
  3. Instantiating a Router
  4. Routing / output
  5. Logging / debugging
php example/example.php


MIT. Please refer to the license file for details.

Brought to you by the LinkORB Engineering team

Check out our other projects at

Btw, we're hiring!