2
2
3
3
namespace Simples \Model ;
4
4
5
+ use Exception ;
5
6
use Simples \Data \Collection ;
7
+ use Simples \Data \Error \SimplesRecordReadonlyError ;
6
8
use Simples \Data \Error \SimplesResourceError ;
7
9
use Simples \Data \Error \SimplesValidationError ;
8
10
use Simples \Data \Record ;
11
+ use Simples \Error \SimplesRunTimeError ;
9
12
use Simples \Model \Error \SimplesActionError ;
10
13
use Simples \Model \Error \SimplesHookError ;
11
14
use Simples \Persistence \Field ;
@@ -40,6 +43,8 @@ abstract public function construct();
40
43
* @param string $alias ('create')
41
44
* @return Record
42
45
* @throws SimplesHookError
46
+ * @throws SimplesRecordReadonlyError
47
+ * @throws SimplesRunTimeError
43
48
*/
44
49
final public function create ($ record = null , string $ alias = null ): Record
45
50
{
@@ -96,6 +101,8 @@ final public function create($record = null, string $alias = null): Record
96
101
* @param bool $clean (false)
97
102
* @return Collection
98
103
* @throws SimplesHookError
104
+ * @throws SimplesRunTimeError
105
+ * @throws Exception
99
106
*/
100
107
final public function read ($ record = null , string $ alias = null , $ trash = false , $ clean = false ): Collection
101
108
{
@@ -153,6 +160,7 @@ final public function read($record = null, string $alias = null, $trash = false,
153
160
* @throws SimplesActionError
154
161
* @throws SimplesHookError
155
162
* @throws SimplesResourceError
163
+ * @throws SimplesRunTimeError
156
164
*/
157
165
final public function update ($ record = null , string $ alias = null , bool $ trash = false ): Record
158
166
{
@@ -216,6 +224,7 @@ final public function update($record = null, string $alias = null, bool $trash =
216
224
* @throws SimplesActionError
217
225
* @throws SimplesHookError
218
226
* @throws SimplesResourceError
227
+ * @throws SimplesRunTimeError
219
228
*/
220
229
final public function destroy ($ record = null , string $ alias = null ): Record
221
230
{
@@ -280,6 +289,10 @@ final public function destroy($record = null, string $alias = null): Record
280
289
* Recycle a destroyed record
281
290
* @param array|Record $record (null)
282
291
* @return Record
292
+ * @throws SimplesActionError
293
+ * @throws SimplesHookError
294
+ * @throws SimplesResourceError
295
+ * @throws SimplesRunTimeError
283
296
* @throws SimplesValidationError
284
297
*/
285
298
final public function recycle ($ record = null ): Record
@@ -303,7 +316,10 @@ final public function recycle($record = null): Record
303
316
* Get total of records based on filters
304
317
* @param Record $record
305
318
* @return int
319
+ * @throws Exception
306
320
* @throws SimplesActionError
321
+ * @throws SimplesHookError
322
+ * @throws SimplesRunTimeError
307
323
*/
308
324
final public function count (Record $ record ): int
309
325
{
0 commit comments