1 | <?php |
||
12 | class CachesRepository |
||
13 | { |
||
14 | /** |
||
15 | * Database table name that this repository maintains. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | public const TABLE = 'caches'; |
||
20 | |||
21 | /** |
||
22 | * @var Connection |
||
23 | */ |
||
24 | private $connection; |
||
25 | /** |
||
26 | * @var SecurityRolesRepository |
||
27 | */ |
||
28 | private $securityRolesRepository; //?? |
||
29 | |||
30 | public function __construct(Connection $connection, SecurityRolesRepository $securityRolesRepository) //?? |
||
35 | |||
36 | /** |
||
37 | * Fetches all caches. |
||
38 | * |
||
39 | * @throws RecordsNotFoundException Thrown when no records are found |
||
40 | * @return UserEntity[] |
||
41 | */ |
||
42 | /** |
||
43 | * Fetches a cache by its id. |
||
44 | * |
||
45 | * @throws RecordNotFoundException Thrown when the request record is not found |
||
46 | */ |
||
47 | public function fetchOneById(int $id): UserEntity |
||
67 | |||
68 | /** |
||
69 | * Prepares database array from properties. |
||
70 | */ |
||
71 | public function getEntityFromDatabaseArray(array $data): CachesEntity |
||
83 | } |
||
84 |