canax/router

View on GitHub
router/000_examples.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
 * Add routes to the router, through programming style, as an alternative
 * to the router configuration files.
 */
global $di;
$router = $di->get("router");

$router->add("", function() use ($di) {
    return "index";
}, "A sample index route.");