1 | <?php |
||
14 | class Router { |
||
15 | use HasRoutesTrait; |
||
16 | |||
17 | /** |
||
18 | * Hook into WordPress actions |
||
19 | * |
||
20 | * @return null |
||
21 | */ |
||
22 | public function boot() { |
||
26 | |||
27 | /** |
||
28 | * Register route rewrite rules with WordPress |
||
29 | * |
||
30 | * @return null |
||
31 | */ |
||
32 | public function registerRewriteRules() { |
||
38 | |||
39 | /** |
||
40 | * Add global middlewares and execute the first satisfied route (if any) |
||
41 | * |
||
42 | * @param string $template |
||
43 | * @return string |
||
44 | */ |
||
45 | public function execute( $template ) { |
||
62 | |||
63 | /** |
||
64 | * Execute a route |
||
65 | * |
||
66 | * @param Request $request |
||
67 | * @param RouteInterface $route |
||
68 | * @param string $template |
||
69 | * @return string |
||
70 | */ |
||
71 | protected function handle( Request $request, RouteInterface $route, $template ) { |
||
87 | } |
||
88 |