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); } }
<?php include_once '../bootstrap.php'; \Wave\Router::init()->route();