/** * @route * /static/([a-z0-9_-]+) */ public function staticPage($matches, $callback) { $page = FW::getIndex($matches, 1); $path = BASE_PATH . '/views/static/' . $page . '.php'; if (empty($page) || !file_exists($path)) { FW::callHttpStatus(404); return false; } echo FW::render('layouts/public', 'static/' . $page); }