protected static function regularize($target, $for_html) { if ($for_html === null) { # 如果是 null,则根据当前运行模式自动判断 $for_html = !kernel::is_pps_mode(); } if ($for_html) { if ($target instanceof target) { $target = $target->as_array(); } $target = html::unescape($target); } return [$target, $for_html]; }
protected static function csrf_url($csrf_role, $target, $for_html = null, $echo = true) { if ($for_html === null) { $for_html = !kernel::is_pps_mode(); } return router::build_csrf_url($csrf_role, $target, $echo, $for_html); }
protected static function get_and_char($for_html) { if ($for_html === null) { return kernel::is_pps_mode() ? '&' : '&'; } else { return $for_html ? '&' : '&'; } }