Esempio n. 1
0
 public static function generate()
 {
     $reflector = new Wave\Reflector(Wave\Config::get('wave')->path->controllers);
     $reflected_options = $reflector->execute();
     $all_actions = self::buildRoutes($reflected_options);
     foreach ($all_actions as $profile => $actions) {
         $route_node = new Node();
         foreach ($actions as $action) {
             foreach ($action->getRoutes() as $route) {
                 $route_node->addChild($route, $action);
             }
         }
         Wave\Cache::store(Router::getCacheName($profile, 'table'), $actions);
         Wave\Cache::store(Router::getCacheName($profile, 'tree'), $route_node);
     }
 }
Esempio n. 2
0
<?php

include_once '../bootstrap.php';
\Wave\Router::init()->route();