protected function CreateRoutes(\Bytes\Router &$Router) { $Router->CreateRoute('/^sample\\/index\\/$/', 'Index', 'HelloWorld'); $Router->CreateRoute('/^sample\\/string\\/$/', 'Index', 'ReturnString'); $Router->CreateRoute('/^sample\\/env\\/$/', 'Index', 'Env'); $Router->HandleErrorsWith('Custom')->CreateRoute('/^sample\\/error\\/$/', 'Index', 'InvokeError'); }
protected function CreateRoutes(\Bytes\Router &$Router) { $Router->CreateRoute('/^\\/?$/', 'Index', 'HelloWorld'); $Router->CreateRoute('/^hmvc\\/?$/', 'Index', 'HMVC'); $Router->CreateRoute('/^install\\/?$/', 'Index', 'Install'); $Router->RequestType('GET')->CreateRoute('/^ajax\\/?$/', 'Index', 'AjaxGET'); $Router->RequestType('POST')->CreateRoute('/^ajax\\/?$/', 'Index', 'AjaxPOST'); $Router->RequestType('PATCH')->CreateRoute('/^ajax\\/?$/', 'Index', 'AjaxPATCH'); $Router->RequestType('PUT')->CreateRoute('/^ajax\\/?$/', 'Index', 'AjaxPUT'); $Router->RequestType('DELETE')->CreateRoute('/^ajax\\/?$/', 'Index', 'AjaxDELETE'); $Router->RequestType('GET')->HandleErrorsWith('JSON')->CreateRoute('/^json\\-error\\/?$/', 'Index', 'JSONError'); $Router->RequestType('GET')->HandleErrorsWith('')->CreateRoute('/^normal\\-error\\/?$/', 'Index', 'NormalError'); }
protected function CreateRoutes(\Bytes\Router &$Router) { $Router->CreateRoute(new ErrorHandle('JSON'), 'Index', 'JSONError'); }