public function configure() { parent::configure(); // automatic redirect on the correct language $this->addRoute('', [$this, 'routeIndex']); // proxy images $this->addRoute('guild/{id}.png', [$this, 'routeImageGuild'])->assert('id', '[A-F0-9-]{35,40}'); $this->addRoute('proxy/{id}.png', [$this, 'routeImageProxy'])->assert('id', '[A-F0-9]+/[0-9]+'); }
public function configure() { parent::configure(); // generic $this->addRoute('', [$this, 'routeIndex']); $this->addRoute('technical-infos', [$this, 'routeTechnicalInfos']); $this->addRoute('token-check', [$this, 'routeTokenCheck']); $this->addRoute('item/{id}{infusions}{upgrades}{skin}{count}.html', [$this, 'routeTooltipItem'])->assert('id', '[0-9]+')->assert('infusions', '(/inf(-[0-9]+)+)?')->assert('upgrades', '(/upg(-[0-9]+)+)?')->assert('skin', '(/ski-[0-9]+)?')->assert('count', '(/cnt-[0-9]+)?'); $this->addRoute('skin/{id}.html', [$this, 'routeTooltipSkin'])->assert('id', '[0-9]+'); $this->addRoute('trait/{id}.html', [$this, 'routeTooltipTrait'])->assert('id', '[0-9]+'); $this->addRoute('specialization/{id}.html', [$this, 'routeTooltipSpecialization'])->assert('id', '[0-9]+'); // user space $regexpCode = '[A-Za-z0-9]{10}'; $this->addRoute('{code}/{any}', [$this, 'routeHome'])->assert('code', $regexpCode)->assert('any', '.*'); $this->addRoute('{code}/{page}/', [$this, 'routePage'])->assert('code', $regexpCode)->assert('page', '[a-z0-9_]+'); $this->addRoute('{code}/{page}/content.html', [$this, 'routePageContent'])->assert('code', $regexpCode)->assert('page', '[a-z0-9_]+'); $this->addRoute('{code}/account/save-rights', [$this, 'routeAccountSaveRights'], 'POST')->assert('code', $regexpCode); $this->addRoute('{code}/account/delete-token', [$this, 'routeAccountDeleteToken'], 'POST')->assert('code', $regexpCode); $this->addRoute('{code}/account/replace-token', [$this, 'routeAccountReplaceToken'], 'POST')->assert('code', $regexpCode); $this->addRoute('{code}/character/{name}', [$this, 'routeCharacter'])->assert('code', $regexpCode); $this->addRoute('{code}/character/{name}.html', [$this, 'routeCharacterContent'])->assert('code', $regexpCode); $this->addRoute('{code}/gw2skills-{mode}/{name}', [$this, 'routeCharacterBuild'])->assert('code', $regexpCode)->assert('mode', 'pve|pvp|wvw'); $this->addRoute('{code}/statistics/{dataset}.json', [$this, 'routeStatisticsJson']); }