1 | <?php |
||
16 | abstract class AbstractJsonApiView implements HttpAttributesAwareInterface, IncludedObjectsAwareInterface |
||
17 | { |
||
18 | use HttpAttributesContainer; |
||
19 | use IncludedObjectsContainer; |
||
20 | |||
21 | /** |
||
22 | * Callback to call after a resource-object has created. |
||
23 | * |
||
24 | * @var callable |
||
25 | */ |
||
26 | protected $resourceCallback; |
||
27 | |||
28 | /** |
||
29 | * Callback to call after a document has created. |
||
30 | * |
||
31 | * @var callable |
||
32 | */ |
||
33 | protected $documentCallback; |
||
34 | |||
35 | /** |
||
36 | * Set a callback to call after a resource-object has created. |
||
37 | * |
||
38 | * @param callable $callback |
||
39 | */ |
||
40 | public function setResourceCallback(callable $callback) |
||
44 | |||
45 | /** |
||
46 | * Has a callback to call after a resource-object has created ? |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function hasResourceCallback(): bool |
||
54 | |||
55 | /** |
||
56 | * Get a callback to call after a resource-object has created. |
||
57 | * |
||
58 | * @return callable |
||
59 | */ |
||
60 | public function getResourceCallback(): callable |
||
64 | |||
65 | /** |
||
66 | * Set acallback to call after a document has created |
||
67 | * |
||
68 | * @param callable $callback |
||
69 | */ |
||
70 | public function setDocumentCallback(callable $callback) |
||
74 | |||
75 | /** |
||
76 | * Has a callback to call after a document has created |
||
77 | * |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function hasDocumentCallback(): bool |
||
84 | |||
85 | /** |
||
86 | * Get a callback to call after a document has created |
||
87 | * |
||
88 | * @return callable |
||
89 | */ |
||
90 | public function getDocumentCallback(): callable |
||
94 | } |