Commit Graph

143 Commits

Author SHA1 Message Date
thinkphp
6e27ae32a9 改进全局请求缓存的缓存标识 2017-03-22 12:08:12 +08:00
thinkphp
bcf64f19f4 调整 2017-02-25 10:51:57 +08:00
thinkphp
428a30e296 改进Request类param方法 2017-02-24 14:02:26 +08:00
thinkphp
c3e45a1a69 改进Request类 2017-02-22 18:21:30 +08:00
thinkphp
e482cbe7e8 改进Request类contentType方法 2017-02-22 11:27:07 +08:00
苗高鹏
21834f797d Merge branch 'master' into bugfix3 2017-02-13 14:53:24 +08:00
thinkphp
1cdb0ba693 改进全局自动请求缓存对子域名的支持 2017-02-09 10:29:45 +08:00
thinkphp
79fb229181 全局请求缓存添加排除规则 添加request_cache_except配置参数 2017-01-26 20:38:22 +08:00
hooklife
5c4df0ce08 修改架构函数为 构造方法 2017-01-10 15:48:42 +08:00
thinkphp
d6b9e2f628 2017更新 2017-01-01 13:00:23 +08:00
thinkphp
e7895d2593 修正Request类contentType方法 2016-12-29 22:33:25 +08:00
thinkphp
dd384422a7 改进 2016-12-29 12:05:58 +08:00
thinkphp
c4686695bc 改进Request类的input和post方法对json格式参数的接收 2016-12-29 10:18:10 +08:00
thinkphp
43b364e286 规范代码 2016-12-24 21:37:05 +08:00
thinkphp
c8712192be 改进Request类的domain方法 2016-12-23 15:36:22 +08:00
thinkphp
83c13a741c 改进Request类的create方法 2016-12-22 10:50:44 +08:00
thinkphp
565222cfea 改进Request类的post和put方法 2016-12-21 18:11:37 +08:00
thinkphp
d898ab35de 改进Request类domain方法 2016-12-21 12:06:09 +08:00
thinkphp
8f2ed014cc 改进Request类的domain方法 包含端口 2016-12-21 11:22:36 +08:00
thinkphp
3cfd718c38 改进命令行模式下 日志写入出错的问题 2016-12-16 14:34:44 +08:00
thinkphp
ce590c2e53 改进Request类的accept方法 2016-12-15 12:29:51 +08:00
thinkphp
0428e1b120 改进Request类的file方法 2016-12-07 07:47:35 +08:00
quzhe
0962b21232 让Request支持json方式的POST
目前RESTful API用json方式提交的很多
目前PUT/PATCH/DELETE方法均可以支持json,但POST方法不能,这不对等
其实更好的方法是判断header里content-type是否为application/json,但因为目前header属性采用的是懒加载,所以暂时沿用目前的字符串判断
2016-11-29 11:40:02 +08:00
thinkphp
a10cc77e40 数组语法调整 2016-11-21 15:33:55 +08:00
thinkphp
7eaf95de9b 请求缓存的有效期如果传入false表示不缓存 路由规则的cache参数传入false也同样表示不缓存 即使开启了全局请求缓存 2016-11-09 13:53:36 +08:00
thinkphp
53329b79b6 Requesst类的Input方法和input助手函数的filter参数支持传入null 表示当前不过滤 2016-11-09 12:17:42 +08:00
thinkphp
57f206b757 增强请求缓存功能 支持全局配置 增加request_cache配置参数 增加特殊缓存规则定义 如果同一次请求存在多次请求缓存调用 则第一次有效 2016-11-01 17:51:38 +08:00
thinkphp
594d263ea2 注释调整 2016-10-31 18:07:06 +08:00
thinkphp
eb103a63a5 改进Request类ip方法 2016-10-22 13:21:49 +08:00
HyperQing
c64a335884 为Request类的几个方法完善注释
在phpstorm2016.2.1中,使用下列语句会提示警告: 

>Method __toString is not implemented for '\think\Request' less... (Ctrl+F1) 
This inspection detects attempts to convert objects without __toString() method implementation to string, since PHP 5.2.0, it would cause E_RECOVERABLE_ERROR. "Check __toString exists for each expression type": if the option is on, the inspection will check all possible types of the expression and report if at least one ot them doesn't contain __toString() method implementation. 
```
$request = Request::instance();
echo "当前模块名称是" . $request->module();// 这句会被IDE提示警告
echo "当前控制器名称是" . $request->controller();// 这句会被IDE提示警告
echo "当前操作名称是" . $request->action();// 这句就不会
```
后来发现是注释引起的问题,注释中有@return string|$this。而action()方法却写成@return string。个人认为应该统一写成@return string|Request 比较合适。学识短浅,仅供参考 
```
/**
     * 设置或者获取当前的模块名
     * @access public
     * @param string $module 模块名
     * @return string|$this
     */
    public function module($module = null)
```
2016-10-21 11:36:55 +08:00
thinkphp
4554f99451 改进 2016-10-15 11:09:34 +08:00
thinkphp
2ef3ad748b 改进 2016-10-15 11:03:56 +08:00
thinkphp
ba555eba00 Request类的架构方法改为protected 2016-10-14 16:28:26 +08:00
thinkphp
aa0028cef6 Request类的header方法增加自定义header支持 2016-10-12 18:06:49 +08:00
thinkphp
2bd63fec40 改进请求缓存支持 2016-09-28 20:57:02 +08:00
thinkphp
e2335946cc 支持设置某个url后缀的访问进行请求缓存 2016-09-27 21:05:22 +08:00
thinkphp
6278cf13e9 改进Request类cache方法 2016-09-27 18:33:29 +08:00
thinkphp
4bd9c4c915 请求缓存标识支持传入__URL__ 表示当前url地址作为缓存标识进行请求缓存 2016-09-27 18:25:09 +08:00
thinkphp
9b16b0c24b 请求缓存发送304 2016-09-26 09:27:13 +08:00
thinkphp
f5f9fcfb92 支持表单模拟ajax和pjax请求 增加var_ajax var_pjax 配置参数 2016-09-25 19:31:06 +08:00
thinkphp
10db21a084 修正cache方法的变量规则检查位置 2016-09-24 22:17:46 +08:00
thinkphp
ba85658c58 request类请求缓存cache方法标识支持变量规则 2016-09-24 22:08:55 +08:00
thinkphp
450d7ab313 增加请求缓存功能 路由支持设置请求缓存 2016-09-24 18:14:59 +08:00
thinkphp
093d356c31 改进操作方法的对象自动注入 Requesst类增加getInput方法 用于获取 php://input值 2016-09-22 13:45:02 +08:00
thinkphp
3a983aa3e1 Request类增加bind方法用于动态绑定属性 Route类的模型绑定直接绑定到Request实例对象的属性 便于获取 2016-09-12 15:47:52 +08:00
过客
b7de2f0db4 解决 php7 数组指针问题
数组存在key()方法无法正确获得预定值
2016-09-09 18:54:00 +08:00
thinkphp
3e062ed3a7 Request类create方法改进,增加单元测试 2016-09-05 15:40:46 +08:00
thinkphp
4bde059d08 改进Request类的type方法判断 2016-09-02 12:24:40 +08:00
thinkphp
23e827c770 改进Request类的request方法 2016-08-23 10:46:58 +08:00
thinkphp
107f77474e 改进Request类param方法的优先获取顺序 路由变量优先 路由规则中的额外参数纳入 路由变量 2016-08-22 18:11:51 +08:00