-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrmInterface.php
More file actions
113 lines (97 loc) · 1.9 KB
/
OrmInterface.php
File metadata and controls
113 lines (97 loc) · 1.9 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
* @author : Jakiboy
* @package : FloatPHP
* @subpackage : Interfaces Kernel Component
* @version : 1.5.x
* @copyright : (c) 2018 - 2025 Jihad Sinnaour <me@jihadsinnaour.com>
* @link : https://floatphp.com
* @license : MIT
*
* This file is a part of FloatPHP Framework.
*/
namespace FloatPHP\Interfaces\Kernel;
interface OrmInterface
{
/**
* @param string $name
* @param mixed $value
*/
function __set(string $name, $value);
/**
* @param string $name
* @return mixed
*/
function __get(string $name);
/**
* @param mixed $bind
* @param mixed $value
* @return object
*/
function bind($bind = [], $value = null) : self;
/**
* @param string $table
* @return object
*/
function setTable(string $table) : self;
/**
* @param string $key
* @return object
*/
function setKey(string $key) : self;
/**
* @param array $data
* @return bool
*/
function create() : bool;
/**
* @param int $id
* @return mixed
*/
function read($id = null);
/**
* @param mixed $id
* @return bool
*/
function update($id = null) : bool;
/**
* @param mixed $id
* @return bool
*/
function delete($id = null) : bool;
/**
* @return int
*/
function lastInsertId() : int;
/**
* @param string $sql
* @param array $bind
* @param string $type
* @param int $mode
* @return mixed
*/
function query(string $sql, ?array $bind = null, ?string $type = null, ?int $mode = null);
/**
* @param mixed $columns
* @param array $sort
* @param int $limit
* @return mixed
*/
function search($columns = '*', array $sort = [], int $limit = 0);
/**
* @param mixed $columns
* @param array $sort
* @return mixed
*/
function searchOne($columns = '*', array $sort = []);
/**
* @param mixed $columns
* @return mixed
*/
function all($columns = '*');
/**
* @param string $field
* @return mixed
*/
function min(string $field);
}