This repository has been archived by the owner on Nov 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IModel.php
74 lines (44 loc) · 1.95 KB
/
IModel.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/***************************************************************************
* *
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
namespace Tygh\Models;
interface IModel
{
// Abstract
public static function model();
public function findMany($params = array());
public function findAll($params = array());
public function find($id, $params = array());
public function save();
public function delete();
public function deleteMany($params);
public function isNewRecord();
// Events
public function beforeFind(&$params);
public function afterFind();
public function beforeSave();
public function afterSave();
public function beforeDelete();
public function afterDelete();
// Instance
public function getTableName();
public function getPrimaryField();
public function getFields($params);
public function getSearchFields();
public function getSortFields();
public function getSortDefaultDirection();
public function getExtraCondition($params);
public function getJoins($params);
public function getLastViewObjectName();
public function getDescriptionTableName();
}