vendor/topthink/framework/src/think/facade/Request.php

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
declare (strict_types = 1);

namespace think\facade;

use think\Facade;
use think\file\UploadedFile;
use think\route\Rule;

/**
 * @see \think\Request
 * @package think\facade
 * @mixin \think\Request
 * @method static \think\Request setDomain(string $domain) 设置当前包含协议的域名
 * @method static string domain(bool $port = false) 获取当前包含协议的域名
 * @method static string rootDomain() 获取当前根域名
 * @method static \think\Request setSubDomain(string $domain) 设置当前泛域名的值
 * @method static string subDomain() 获取当前子域名
 * @method static \think\Request setPanDomain(string $domain) 设置当前泛域名的值
 * @method static string panDomain() 获取当前泛域名的值
 * @method static \think\Request setUrl(string $url) 设置当前完整URL 包括QUERY_STRING
 * @method static string url(bool $complete = false) 获取当前完整URL 包括QUERY_STRING
 * @method static \think\Request setBaseUrl(string $url) 设置当前URL 不含QUERY_STRING
 * @method static string baseUrl(bool $complete = false) 获取当前URL 不含QUERY_STRING
 * @method static string baseFile(bool $complete = false) 获取当前执行的文件 SCRIPT_NAME
 * @method static \think\Request setRoot(string $url) 设置URL访问根地址
 * @method static string root(bool $complete = false) 获取URL访问根地址
 * @method static string rootUrl() 获取URL访问根目录
 * @method static \think\Request setPathinfo(string $pathinfo) 设置当前请求的pathinfo
 * @method static string pathinfo() 获取当前请求URL的pathinfo信息(含URL后缀)
 * @method static string ext() 当前URL的访问后缀
 * @method static integer|float time(bool $float = false) 获取当前请求的时间
 * @method static string type() 当前请求的资源类型
 * @method static void mimeType(string|array $type, string $val = '') 设置资源类型
 * @method static \think\Request setMethod(string $method) 设置请求类型
 * @method static string method(bool $origin = false) 当前的请求类型
 * @method static bool isGet() 是否为GET请求
 * @method static bool isPost() 是否为POST请求
 * @method static bool isPut() 是否为PUT请求
 * @method static bool isDelete() 是否为DELTE请求
 * @method static bool isHead() 是否为HEAD请求
 * @method static bool isPatch() 是否为PATCH请求
 * @method static bool isOptions() 是否为OPTIONS请求
 * @method static bool isCli() 是否为cli
 * @method static bool isCgi() 是否为cgi
 * @method static mixed param(string|array $name = '', mixed $default = null, string|array $filter = '') 获取当前请求的参数
 * @method static \think\Request setRule(Rule $rule) 设置路由变量
 * @method static Rule|null rule() 获取当前路由对象
 * @method static \think\Request setRoute(array $route) 设置路由变量
 * @method static mixed route(string|array $name = '', mixed $default = null, string|array $filter = '') 获取路由参数
 * @method static mixed get(string|array $name = '', mixed $default = null, string|array $filter = '') 获取GET参数

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。