From 624656db8ef46c81ea34ccf3a1a46c4f43d72e27 Mon Sep 17 00:00:00 2001 From: ThinkPHP Date: Thu, 18 Apr 2013 10:00:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Think\Model\ExtendModel=20?= =?UTF-8?q?Think\Model\RelationModel=20Think\Model\ViewModel=20=E4=B8=89?= =?UTF-8?q?=E4=B8=AA=E6=A8=A1=E5=9E=8B=E7=BB=84=E8=A3=85=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Think/Model.php | 2 +- Library/Think/Model/ExtendModel.php | 18 ++++++++++++++++++ Library/Think/Model/RelationModel.php | 16 ++++++++++++++++ Library/Think/Model/ViewModel.php | 16 ++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 Library/Think/Model/ExtendModel.php create mode 100644 Library/Think/Model/RelationModel.php create mode 100644 Library/Think/Model/ViewModel.php diff --git a/Library/Think/Model.php b/Library/Think/Model.php index b17e0468..1f40bdcb 100644 --- a/Library/Think/Model.php +++ b/Library/Think/Model.php @@ -302,7 +302,7 @@ class Model { } // 删除成功后的回调方法 protected function _after_delete($data,$options) {} - + /** * 查询数据集 * @access public diff --git a/Library/Think/Model/ExtendModel.php b/Library/Think/Model/ExtendModel.php new file mode 100644 index 00000000..dc878991 --- /dev/null +++ b/Library/Think/Model/ExtendModel.php @@ -0,0 +1,18 @@ + +// +---------------------------------------------------------------------- + +namespace Think\Model; +use Traits\Think\Model\Extend,Traits\Think\Model\Query; +T('Think/Model/Extend'); +T('Think/Model/Query'); +class ExtendModel extends \Think\Model { + use Extend,Query; +} \ No newline at end of file diff --git a/Library/Think/Model/RelationModel.php b/Library/Think/Model/RelationModel.php new file mode 100644 index 00000000..a1937d3b --- /dev/null +++ b/Library/Think/Model/RelationModel.php @@ -0,0 +1,16 @@ + +// +---------------------------------------------------------------------- + +namespace Think\Model; +T('Think/Model/Relation'); +class ViewModel extends \Think\Model { + use \Traits\Think\Relation; +} \ No newline at end of file diff --git a/Library/Think/Model/ViewModel.php b/Library/Think/Model/ViewModel.php new file mode 100644 index 00000000..9f7fcfbd --- /dev/null +++ b/Library/Think/Model/ViewModel.php @@ -0,0 +1,16 @@ + +// +---------------------------------------------------------------------- + +namespace Think\Model; +T('Think/Model/View'); +class ViewModel extends \Think\Model { + use \Traits\Think\View; +} \ No newline at end of file