Commit Graph

2420 Commits

Author SHA1 Message Date
thinkphp
d33ed07d00 修正验证类一处BUG 2016-10-21 18:03:47 +08:00
thinkphp
294a49b8b1 改进验证类的image方法 2016-10-21 17:51:19 +08:00
thinkphp
35a12fac90 Merge branch 'master' of https://github.com/top-think/framework 2016-10-21 17:36:49 +08:00
thinkphp
5a417480a1 改进验证类的activeUrl方法 改进Query类分页方法的参数绑定 2016-10-21 17:36:09 +08:00
ThinkPHP
d0fd890ce9 Merge pull request #325 from clyoko/master
为Request类的几个方法完善注释
2016-10-21 17:25:16 +08:00
thinkphp
afa1376941 改进自定义验证规则的使用 2016-10-21 17:21:09 +08:00
thinkphp
367242113d 改进控制器自动搜索后的控制器名获取 2016-10-21 12:02:29 +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
3be17ea06b 修正静态路由检测 2016-10-20 23:38:14 +08:00
thinkphp
0117543df0 改进Session类的flush方法 判断是否开启session 2016-10-20 10:59:28 +08:00
thinkphp
cbd4c2c98c 路由变量规则支持闭包 2016-10-19 22:51:09 +08:00
thinkphp
d0cc9a7146 改进Model类的save方法 新增数据的时候添加不是自增主键的处理 2016-10-19 17:23:34 +08:00
thinkphp
4ceee7c5b2 invoke自动注入方法传入当前请求对象 2016-10-19 17:12:11 +08:00
thinkphp
a25b16b0cf Session类增加flash方法用于设置下一次请求有效的值 flush方法用于清空当前请求有效的值 增加push方法
Redirect response类的with方法改为调用session类的flash方法
2016-10-19 15:16:31 +08:00
thinkphp
53233db821 改进App类 2016-10-19 12:27:43 +08:00
thinkphp
3a0bf10c3d Merge branch 'master' of https://github.com/top-think/framework 2016-10-19 11:24:16 +08:00
thinkphp
3f654b6e5e 改进自动注入机制 需要依赖注入的类如果定义了invoke方法则自动调用 2016-10-19 11:22:35 +08:00
ThinkPHP
020a8aa49a Merge pull request #321 from lw78665806/master
修复验证器规则无法获取多语言的问题
2016-10-18 21:23:50 +08:00
thinkphp
cb9b2b5803 Cache类增加remember方法 用于当获取的缓存不存在的时候自动写入 2016-10-18 16:19:06 +08:00
lw78665806
9e0b5da416 Update Validate.php
修复验证器无法获取多语言的问题
2016-10-18 10:14:37 +08:00
lw78665806
a449e236fa Update Validate.php
修复验证器规则无法获取多语言的问题
2016-10-18 10:08:55 +08:00
yunwuxin
bb9e33e9a5 修正json_encode时 "Failed calling XXX::jsonSerialize()" 的异常 2016-10-17 17:52:09 +08:00
thinkphp
d9be9ddf6f 改进Loader类model和validate方法 2016-10-17 13:53:53 +08:00
thinkphp
f2e51604f4 改进整型字段的参数绑定写入 默认值 2016-10-17 12:09:13 +08:00
thinkphp
99300f8d4d 修正Query类setInc和setDec方法 2016-10-16 19:26:04 +08:00
thinkphp
4554f99451 改进 2016-10-15 11:09:34 +08:00
thinkphp
2ef3ad748b 改进 2016-10-15 11:03:56 +08:00
thinkphp
fbd76aaf51 改进路由地址生成 2016-10-15 00:02:02 +08:00
thinkphp
381a56f334 路由生成改进对 路由地址为类的方法的支持 2016-10-14 23:38:38 +08:00
thinkphp
27bf7b2af9 改进Url类 2016-10-14 23:03:19 +08:00
thinkphp
dc5f0458d3 路由地址生成支持url_param_type配置参数 2016-10-14 18:04:55 +08:00
thinkphp
ac488186a4 Merge branch 'master' of https://github.com/top-think/framework 2016-10-14 16:28:54 +08:00
thinkphp
ba555eba00 Request类的架构方法改为protected 2016-10-14 16:28:26 +08:00
thinkphp
b9b7e34b6d 修正单元测试 2016-10-13 23:34:34 +08:00
thinkphp
4c285d94d9 改进Url类 2016-10-13 23:28:53 +08:00
thinkphp
d65daa2fdc URL生成支持别名路由 2016-10-13 23:17:19 +08:00
thinkphp
3fdd4f1009 Route重定向规则支持更多 schema 2016-10-13 14:18:01 +08:00
thinkphp
fff423a5eb 修正Route类checkRouteAlias方法 2016-10-13 12:31:39 +08:00
thinkphp
cb3278b725 改进方法执行的日志记录 2016-10-13 11:53:19 +08:00
thinkphp
112f225065 别名路由增加操作白名单 2016-10-12 22:26:38 +08:00
thinkphp
245dba00a7 别名路由支持操作方法排除 2016-10-12 22:07:36 +08:00
thinkphp
aa0028cef6 Request类的header方法增加自定义header支持 2016-10-12 18:06:49 +08:00
thinkphp
2222cbfd53 Merge branch 'master' of https://github.com/top-think/framework 2016-10-11 23:21:43 +08:00
thinkphp
ca112f5637 改进别名路由的路由参数定义 支持定义单独方法的请求类型 2016-10-11 23:20:11 +08:00
thinkphp
5ff97ce68d 改进Model类has和hasWhere方法 2016-10-11 12:27:22 +08:00
thinkphp
6440a640cd 改进路由分组的url生成 2016-10-10 18:11:45 +08:00
thinkphp
c67eb5adc8 改进Query类的value方法缓存判断 2016-10-10 17:25:37 +08:00
thinkphp
e3466b4383 改进Query类join方法对子查询支持 2016-10-10 16:29:47 +08:00
thinkphp
cbfd825311 改进模板引擎的Think变量解析 2016-10-10 12:17:48 +08:00
thinkphp
0b8327d135 改进 2016-10-10 10:51:32 +08:00