-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathResourceEntityInterface.php
57 lines (48 loc) · 1.11 KB
/
ResourceEntityInterface.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
<?php namespace RestExtension;
use OrmExtension\Extensions\Entity;
/**
* Created by PhpStorm.
* User: martin
* Date: 2018-12-05
* Time: 14:04
*/
interface ResourceEntityInterface {
/**
* @param array $data
* @return ResourceEntityInterface|Entity
*/
public static function post($data);
/**
* @param int $id
* @param array $data
* @return ResourceEntityInterface|Entity
*/
public static function put($id, $data);
/**
* @param int $id
* @param array $data
* @return ResourceEntityInterface|Entity
*/
public static function patch($id, $data);
/**
* @return string[]
*/
public function getPopulateIgnore();
/**
* @param array $data
*/
public function populatePut($data);
/**
* @param array $data
* @return bool
*/
public function populatePatch($data);
/**
* @param ResourceEntityInterface|Entity $relation
*/
public function relationAdded($relation);
/**
* @param ResourceEntityInterface|Entity $relation
*/
public function relationRemoved($relation);
}