1 | <?php |
||
28 | class Collection extends AbstractResource implements CollectionInterface |
||
29 | { |
||
30 | /** |
||
31 | * Kind. |
||
32 | */ |
||
33 | public const KIND = 'Collection'; |
||
34 | |||
35 | /** |
||
36 | * Collection name. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $name; |
||
41 | |||
42 | /** |
||
43 | * ResourceNamespace. |
||
44 | * |
||
45 | * @var ResourceNamespaceInterface |
||
46 | */ |
||
47 | protected $namespace; |
||
48 | |||
49 | /** |
||
50 | * Schema. |
||
51 | * |
||
52 | * @var SchemaInterface |
||
53 | */ |
||
54 | protected $schema; |
||
55 | |||
56 | /** |
||
57 | * Logger. |
||
58 | * |
||
59 | * @var LoggerInterface |
||
60 | */ |
||
61 | protected $logger; |
||
62 | |||
63 | /** |
||
64 | * Dataobject factory. |
||
65 | * |
||
66 | * @var DataObjectFactory |
||
67 | */ |
||
68 | protected $object_factory; |
||
69 | |||
70 | /** |
||
71 | * Endpoint factory. |
||
72 | * |
||
73 | * @var EndpointFactory |
||
74 | */ |
||
75 | protected $endpoint_factory; |
||
76 | |||
77 | /** |
||
78 | * Collection name. |
||
79 | * |
||
80 | * @var string |
||
81 | */ |
||
82 | protected $collection; |
||
83 | |||
84 | /** |
||
85 | * Initialize. |
||
86 | */ |
||
87 | 11 | public function __construct(string $name, ResourceNamespaceInterface $namespace, EndpointFactory $endpoint_factory, DataObjectFactory $object_factory, SchemaInterface $schema, LoggerInterface $logger, array $resource = []) |
|
98 | |||
99 | /** |
||
100 | * Get collection. |
||
101 | */ |
||
102 | 7 | public function getCollection(): string |
|
106 | |||
107 | /** |
||
108 | * Get schema. |
||
109 | */ |
||
110 | public function getSchema(): SchemaInterface |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | 2 | public function getResourceNamespace(): ResourceNamespaceInterface |
|
122 | |||
123 | /** |
||
124 | * Decorate. |
||
125 | */ |
||
126 | 1 | public function decorate(ServerRequestInterface $request): array |
|
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | public function hasEndpoint(string $name): bool |
||
149 | |||
150 | /** |
||
151 | * {@inheritdoc} |
||
152 | */ |
||
153 | public function getEndpoint(string $name): EndpointInterface |
||
157 | |||
158 | /** |
||
159 | * {@inheritdoc} |
||
160 | */ |
||
161 | public function getEndpoints(array $endpoints = [], ?int $offset = null, ?int $limit = null, ?array $sort = null): Generator |
||
165 | |||
166 | /** |
||
167 | * {@inheritdoc} |
||
168 | */ |
||
169 | public function getSourceEndpoints(array $endpoints = [], ?int $offset = null, ?int $limit = null): Generator |
||
178 | |||
179 | /** |
||
180 | * {@inheritdoc} |
||
181 | */ |
||
182 | public function getDestinationEndpoints(array $endpoints = [], ?int $offset = null, ?int $limit = null): Generator |
||
191 | |||
192 | /** |
||
193 | * {@inheritdoc} |
||
194 | */ |
||
195 | 1 | public function getIdentifier(): string |
|
199 | |||
200 | /** |
||
201 | * {@inheritdoc} |
||
202 | */ |
||
203 | public function getObjectHistory(ObjectIdInterface $id, ?array $filter = null, ?int $offset = null, ?int $limit = null): Generator |
||
207 | |||
208 | /** |
||
209 | * {@inheritdoc} |
||
210 | */ |
||
211 | public function getObject(array $filter, bool $include_dataset = true, int $version = 0): DataObjectInterface |
||
215 | |||
216 | /** |
||
217 | * {@inheritdoc} |
||
218 | */ |
||
219 | public function getObjects(array $query = [], bool $include_dataset = true, ?int $offset = null, ?int $limit = null, ?array $sort = null): Generator |
||
223 | |||
224 | /** |
||
225 | * {@inheritdoc} |
||
226 | */ |
||
227 | public function countObjects(array $query = [], bool $include_dataset = true, ?int $offset = null, ?int $limit = null, ?array $sort = null): int |
||
231 | |||
232 | /** |
||
233 | * {@inheritdoc} |
||
234 | */ |
||
235 | 1 | public function createObject(array $object, bool $simulate = false, ?array $endpoints = null): ObjectIdInterface |
|
239 | |||
240 | /** |
||
241 | * {@inheritdoc} |
||
242 | */ |
||
243 | public function changeObject(DataObjectInterface $object, array $data, bool $simulate = false, ?array $endpoints = null): bool |
||
247 | |||
248 | /** |
||
249 | * {@inheritdoc} |
||
250 | */ |
||
251 | public function deleteObject(ObjectIdInterface $id, bool $simulate = false): bool |
||
255 | |||
256 | /** |
||
257 | * {@inheritdoc} |
||
258 | */ |
||
259 | public function flush(bool $simulate = false): bool |
||
263 | } |
||
264 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.