Lines n/a 0 / 0
Functions and Methods n/a 0 / 0
Classes and Traits n/a 0 / 0
Name Lines Functions and Methods CRAP Classes and Traits
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Contracts\Registry;
6
7use Stewart\Contracts\Entity\EntityId;
8use Stewart\Contracts\Exception\IdentifierException;
9use Stewart\Contracts\Registry\Collection\AreaCollection;
10use Stewart\Contracts\Registry\Collection\DeviceCollection;
11use Stewart\Contracts\Registry\Collection\FloorCollection;
12use Stewart\Contracts\Registry\Collection\LabelCollection;
13use Stewart\Contracts\Registry\Collection\RegisteredEntityCollection;
14
15interface Registry
16{
17    public function listAreas(): AreaCollection;
18
19    /** @throws IdentifierException */
20    public function findArea(AreaId|string $areaId): ?Area;
21
22    public function findAreaByName(string $name): ?Area;
23
24    /** @throws IdentifierException */
25    public function listAreasOnFloor(FloorId|string $floorId): AreaCollection;
26
27    public function listFloors(): FloorCollection;
28
29    /** @throws IdentifierException */
30    public function findFloor(FloorId|string $floorId): ?Floor;
31
32    public function findFloorByName(string $name): ?Floor;
33
34    public function listLabels(): LabelCollection;
35
36    /** @throws IdentifierException */
37    public function findLabel(LabelId|string $labelId): ?Label;
38
39    public function findLabelByName(string $name): ?Label;
40
41    public function listDevices(): DeviceCollection;
42
43    /** @throws IdentifierException */
44    public function findDevice(DeviceId|string $deviceId): ?Device;
45
46    /** @throws IdentifierException */
47    public function listDevicesInArea(AreaId|string $areaId): DeviceCollection;
48
49    public function listEntities(): RegisteredEntityCollection;
50
51    /** @throws IdentifierException */
52    public function findEntity(EntityId|string $entityId): ?RegisteredEntity;
53
54    /** @throws IdentifierException */
55    public function findEntityPlacement(EntityId|string $entityId): EntityPlacement;
56}