1 | <?php |
||
24 | class Factory |
||
25 | { |
||
26 | /** |
||
27 | * Database. |
||
28 | * |
||
29 | * @var Database |
||
30 | */ |
||
31 | protected $db; |
||
32 | |||
33 | /** |
||
34 | * Resource factory. |
||
35 | * |
||
36 | * @var ResourceFactory |
||
37 | */ |
||
38 | protected $resource_factory; |
||
39 | |||
40 | /** |
||
41 | * Data object relation factory. |
||
42 | * |
||
43 | * @var DataObjectRelationFactory |
||
44 | */ |
||
45 | protected $relation_factory; |
||
46 | |||
47 | /** |
||
48 | * Logger. |
||
49 | * |
||
50 | * @var LoggerInterface |
||
51 | */ |
||
52 | protected $logger; |
||
53 | |||
54 | /** |
||
55 | * Initialize. |
||
56 | */ |
||
57 | public function __construct(Database $db, ResourceFactory $resource_factory, DataObjectRelationFactory $relation_factory, LoggerInterface $logger) |
||
64 | |||
65 | /** |
||
66 | * Count objects. |
||
67 | */ |
||
68 | public function count(CollectionInterface $collection, array $query = []): int |
||
72 | |||
73 | /** |
||
74 | * /** |
||
75 | * Has object. |
||
76 | */ |
||
77 | public function has(CollectionInterface $collection, string $name): bool |
||
83 | |||
84 | /** |
||
85 | * Get object history. |
||
86 | */ |
||
87 | public function getObjectHistory(CollectionInterface $collection, ObjectIdInterface $id, ?array $filter = null, ?int $offset = null, ?int $limit = null): Generator |
||
119 | |||
120 | /** |
||
121 | * Get one. |
||
122 | */ |
||
123 | public function getOne(CollectionInterface $collection, array $filter, bool $include_dataset = true, int $version = 0): DataObjectInterface |
||
145 | |||
146 | /** |
||
147 | * Get all. |
||
148 | */ |
||
149 | public function getAll(CollectionInterface $collection, ?array $query = null, bool $include_dataset = true, ?int $offset = 0, ?int $limit = 0, ?array $sort = null): Generator |
||
157 | |||
158 | /** |
||
159 | * Create. |
||
160 | */ |
||
161 | public function create(CollectionInterface $collection, array $object, bool $simulate = false, ?array $endpoints = null): ObjectIdInterface |
||
184 | |||
185 | /** |
||
186 | * Update. |
||
187 | */ |
||
188 | public function update(CollectionInterface $collection, DataObjectInterface $object, array $data, bool $simulate = false, ?array $endpoints = null): bool |
||
199 | |||
200 | /** |
||
201 | * Delete one. |
||
202 | */ |
||
203 | public function deleteOne(CollectionInterface $collection, string $name, bool $simulate = false): bool |
||
209 | |||
210 | /** |
||
211 | * Delete all. |
||
212 | */ |
||
213 | public function deleteAll(CollectionInterface $collection, bool $simulate = false): bool |
||
225 | |||
226 | /** |
||
227 | * Change stream. |
||
228 | */ |
||
229 | public function watch(CollectionInterface $collection, ?ObjectIdInterface $after = null, bool $existing = true, ?array $query = null, ?int $offset = null, ?int $limit = null, ?array $sort = null): Generator |
||
237 | |||
238 | /** |
||
239 | * Build. |
||
240 | */ |
||
241 | public function build(array $resource, CollectionInterface $collection): DataObjectInterface |
||
245 | } |
||
246 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.