规范修正

This commit is contained in:
thinkphp
2015-10-04 22:32:55 +08:00
parent 27e724bb3c
commit 3b21161c0a
9 changed files with 18 additions and 17 deletions

View File

@@ -11,8 +11,8 @@
namespace think\image\driver;
use think\Lang as Lang;
use think\image\driver\Imagick as Imagick;
use think\Lang;
class Imagick
{
/**

View File

@@ -11,10 +11,12 @@
namespace think;
use think\Lang;
class Validate
{
protected $validate = []; // 自动验证定义
// 自动验证定义
protected $validate = [];
// 是否批处理验证
protected $patchValidate = false;
protected $error = '';
@@ -54,7 +56,7 @@ class Validate
if (0 == strpos($val[2], '{%') && strpos($val[2], '}'))
// 支持提示信息的多语言 使用 {%语言定义} 方式
{
$val[2] = L(substr($val[2], 2, -1));
$val[2] = Lang::get(substr($val[2], 2, -1));
}
$val[3] = isset($val[3]) ? $val[3] : 0;

View File

@@ -11,8 +11,6 @@
namespace think;
use think\Exception;
/**
* App 应用管理
* @author liu21st <liu21st@gmail.com>
@@ -73,7 +71,7 @@ class App
$namespace = MODULE_NAME . '\\' . CONTROLLER_LAYER . '\\' . CONTROLLER_NAME . '\\';
} else {
// 空控制器
$namespace = MODULE_NAME . '\\' . CONTROLLER_LAYER . '\\empty\\';
$namespace = MODULE_NAME . '\\' . CONTROLLER_LAYER . '\\' . $config['empty_controller'] . '\\';
}
$actionName = strtolower(ACTION_NAME);
if (class_exists($namespace . $actionName)) {

View File

@@ -13,8 +13,8 @@ namespace think\db\driver;
use think\db\Driver;
use think\Exception;
use think\Lang as Lang;
use think\Log as Log;
use think\Lang;
use think\Log;
/**
* Mongo数据库驱动

View File

@@ -205,7 +205,7 @@ class TagLib
case 'CONST':$parseStr = strtoupper($vars[2]);
break;
case 'LANG':
$parseStr = 'L("' . $vars[2] . '")';
$parseStr = '\think\Lang::get("' . $vars[2] . '")';
break;
case 'CONFIG':
if (isset($vars[3])) {

View File

@@ -209,7 +209,7 @@ trait Auto
if (empty($val[5]) || self::MODEL_BOTH == $val[5] || $val[5] == $type) {
if (0 == strpos($val[2], '{%') && strpos($val[2], '}')) {
// 支持提示信息的多语言 使用 {%语言定义} 方式
$val[2] = L(substr($val[2], 2, -1));
$val[2] = \think\Lang::get(substr($val[2], 2, -1));
}
$val[3] = isset($val[3]) ? $val[3] : EXISTS_VALIDATE;
$val[4] = isset($val[4]) ? $val[4] : 'regex';

View File

@@ -13,6 +13,7 @@ namespace traits\think\model;
use think\Lang;
use think\Loader;
trait Extend
{