1 | <?php |
||
12 | class CacheSizeRepository |
||
13 | { |
||
14 | const TABLE = 'cache_size'; |
||
15 | |||
16 | /** @var Connection */ |
||
17 | private $connection; |
||
18 | |||
19 | public function __construct(Connection $connection) |
||
23 | |||
24 | /** |
||
25 | * @return array |
||
26 | * @throws RecordsNotFoundException |
||
27 | */ |
||
28 | public function fetchAll() |
||
49 | |||
50 | /** |
||
51 | * @param array $where |
||
52 | * |
||
53 | * @return GeoCacheSizeEntity |
||
54 | * @throws RecordNotFoundException |
||
55 | */ |
||
56 | public function fetchOneBy(array $where = []) |
||
79 | |||
80 | /** |
||
81 | * @param array $where |
||
82 | * |
||
83 | * @return array |
||
84 | * @throws RecordsNotFoundException |
||
85 | */ |
||
86 | public function fetchBy(array $where = []) |
||
114 | |||
115 | /** |
||
116 | * @param GeoCacheSizeEntity $entity |
||
117 | * |
||
118 | * @return GeoCacheSizeEntity |
||
119 | * @throws RecordAlreadyExistsException |
||
120 | * @throws \Doctrine\DBAL\DBALException |
||
121 | */ |
||
122 | public function create(GeoCacheSizeEntity $entity) |
||
139 | |||
140 | /** |
||
141 | * @param GeoCacheSizeEntity $entity |
||
142 | * |
||
143 | * @return GeoCacheSizeEntity |
||
144 | * @throws RecordNotPersistedException |
||
145 | * @throws \Doctrine\DBAL\DBALException |
||
146 | */ |
||
147 | public function update(GeoCacheSizeEntity $entity) |
||
163 | |||
164 | /** |
||
165 | * @param GeoCacheSizeEntity $entity |
||
166 | * |
||
167 | * @return GeoCacheSizeEntity |
||
168 | * @throws RecordNotPersistedException |
||
169 | * @throws \Doctrine\DBAL\DBALException |
||
170 | * @throws \Doctrine\DBAL\Exception\InvalidArgumentException |
||
171 | */ |
||
172 | public function remove(GeoCacheSizeEntity $entity) |
||
187 | |||
188 | /** |
||
189 | * @param GeoCacheSizeEntity $entity |
||
190 | * |
||
191 | * @return array |
||
192 | */ |
||
193 | public function getDatabaseArrayFromEntity(GeoCacheSizeEntity $entity) |
||
204 | |||
205 | /** |
||
206 | * @param array $data |
||
207 | * |
||
208 | * @return GeoCacheSizeEntity |
||
209 | */ |
||
210 | public function getEntityFromDatabaseArray(array $data) |
||
222 | } |
||
223 |