Skip to content

Commit 24ecef0

Browse files
committed
docblocks in router
1 parent 8a3752f commit 24ecef0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/Router.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,27 @@ class Router
44
{
55
protected $routes = [];
66

7+
/**
8+
* loading the routes
9+
*/
710
public static function load($file)
811
{
912
$router = new static;
1013
require $file;
11-
1214
return $router;
1315
}
16+
17+
/**
18+
* defining the routes
19+
*/
1420
public function define($routes)
1521
{
16-
1722
$this->routes = $routes;
1823
}
1924

25+
/**
26+
* directing the routes to the controller
27+
*/
2028
public function direct($uri)
2129
{
2230
if(array_key_exists($uri, $this->routes))

0 commit comments

Comments
 (0)