改进Response类的send方法 去除 REQUEST_METHOD IS_GET IS_POST IS_PUT IS_DELETE IS_AJAX __EXT__ 常量 由应用自己定义

This commit is contained in:
thinkphp
2016-06-02 12:13:00 +08:00
parent ee9d5df56f
commit 8099a001e2
7 changed files with 63 additions and 32 deletions

View File

@@ -12,6 +12,7 @@
namespace think;
use think\Input;
use think\Request;
class Validate
{
@@ -684,7 +685,8 @@ class Validate
*/
protected function method($value, $rule)
{
return REQUEST_METHOD == strtoupper($rule);
$method = Request::instance()->method();
return $method == strtoupper($rule);
}
/**