public static function getInstance($path, $params) { if (!count($path)) { self::redirectTo('groups/list'); exit; } $sname = $path[0]; $path = self::nextPath($path); switch ($sname) { case 'add-group': $page = Groups\AddGroupPage::getInstance($path, $params); break; case 'list': $page = Groups\GroupListPage::getInstance($path, $params); break; case 'details': $page = Groups\GroupDetailsPage::getInstance($path, $params); break; case 'permissions': $page = Groups\GroupPermissionsPage::getInstance($path, $params); break; default: $page = NotFoundPage::getInstance($path, $params); } return $page; }
public static function getInstance($path, $params) { if (!count($path)) { self::redirectTo('links/list'); exit; } $sname = $path[0]; $path = self::nextPath($path); switch ($sname) { case 'shorten': $page = Links\ShortenLinkPage::getInstance($path, $params); break; case 'add-wildcard': $page = Links\AddWildcardPage::getInstance($path, $params); break; case 'list': $page = Links\LinkListPage::getInstance($path, $params); break; case 'details': $page = Links\LinkDetailsPage::getInstance($path, $params); break; case 'resolve': $page = Links\ResolveLinkPage::getInstance($path, $params); break; default: $page = NotFoundPage::getInstance($path, $params); } return $page; }
public static function getInstance($path, $params) { $sname = count($path) ? $path[0] : ''; $path = self::nextPath($path); switch ($sname) { case 'qr-code': $page = Tools\QRCodePage::getInstance($path, $params); break; default: $page = NotFoundPage::getInstance($path, $params); } return $page; }
public static function getInstance($path, $params) { if (!count($path)) { self::redirectTo('settings/own/account'); exit; } $sname = $path[0]; $path = self::nextPath($path); switch ($sname) { case 'account': $page = Own\AccountSettingsPage::getInstance($path, $params); break; default: $page = NotFoundPage::getInstance($path, $params); } return $page; }
public static function getInstance($path, $params) { Page::requirePermission('settings.change_site_settings'); if (!count($path)) { self::redirectTo('settings/site/general'); exit; } $sname = $path[0]; $path = self::nextPath($path); switch ($sname) { case 'general': $page = Site\GeneralSettingsPage::getInstance($path, $params); break; case 'links': $page = Site\LinksSettingsPage::getInstance($path, $params); break; case 'users': $page = Site\UsersSettingsPage::getInstance($path, $params); break; default: $page = NotFoundPage::getInstance($path, $params); } return $page; }