[ 'pattern' => $prefix.'/{keyword}-{id}.html', 'callback' => QuestionPage::class, 'priority' => 20, 'before' => function ($p) { if (isset($p['title'])) { $p['keyword'] = mb_substr(mb_strtolower(func::translit($p['title'])), 0, 100); unset($p['title']); } return $p; }, ], # помощь: поиск 'help-search' => [ 'pattern' => $prefix.'/search{/any?}', 'callback' => SearchPage::class, 'priority' => 30, ], # помощь: список вопросов в категории 'help-cat' => [ 'pattern' => $prefix.'/{keyword}/', 'callback' => CategoryPage::class, 'priority' => 35, ], # помощь: главная 'help-index' => [ 'pattern' => $prefix.'{/any?}', 'callback' => IndexPage::class, 'priority' => 40, ], ];