<?php namespace App; use \App\Controller\AuthController; use \App\Controller\GroupsController; function init_auth($router) { $router -> linking("GET", "signup", function(){ $auth_controller = new AuthController(); return $auth_controller -> signup(); }); $router -> linking("GET", "signin", function(){ $auth_controller = new AuthController(); return $auth_controller -> signin(); }); $router -> linking("GET", "signout", function(){ $auth_controller = new AuthController(); return $auth_controller -> signout(); }); } function init_groups($router) { $router -> linking("GET", "groups-create", function(){ $groups_controller = new GroupsController(); return $groups_controller -> create(); }); $router -> linking("GET", "groups-list", function(){ $groups_controller = new GroupsController(); return $groups_controller -> get_list(); }); $router -> linking("GET", "groups-change-title", function(){ $groups_controller = new GroupsController(); return $groups_controller -> change_title(); }); $router -> linking("GET", "groups-change-position", function(){ $groups_controller = new GroupsController(); return $groups_controller -> change_position(); }); } function init_routes_map($router) { init_auth($router); init_groups($router); }