Router
class Router
This class is responsible for routing between views.
Methods
Gets link based on value from acl.
Parses menu_acl.json file to determine menu contents depending on acl of user.
Checks if user has access to a particular section of the site and grants access if that is the case.
Performs redirect operations.
Resolves namespaces for controllers.
Supports operations for routing. It parses the url to determine which page needs to be rendered. That path is parsed to determine the correct controller and action to use.
Details
at line 28
static private string|false
get_link(string $value)
Gets link based on value from acl.
at line 52
static array
getMenu(string $menu)
Parses menu_acl.json file to determine menu contents depending on acl of user.
at line 94
static bool
hasAccess(string $controller_name, string $action_name = "index")
Checks if user has access to a particular section of the site and grants access if that is the case.
at line 162
static void
redirect(string $location, array $params = [])
Performs redirect operations.
at line 202
static private string|bool
resolveControllerClass(string $controllerShort)
Resolves namespaces for controllers.
at line 224
static void
route()
Supports operations for routing. It parses the url to determine which page needs to be rendered. That path is parsed to determine the correct controller and action to use.