7e1a8fa1415d446acc868bdd1cf34248eed27379
[rock.divinelegy.git] / DataAccess / StepMania / SimfileRepository.php
1 <?php
2
3 namespace DataAccess\StepMania;
4
5 use DataAccess\StepMania\ISimfileRepository;
6 use DataAccess\DataMapper\IDataMapper;
7 use Domain\Entities\StepMania\ISimfile;
8
9 //TODO: Implement some sort of caching. Probably OK for now not to worry.
10 class SimfileRepository implements ISimfileRepository
11 {
12 private $dataMapper;
13
14 public function __construct(IDataMapper $dataMapper) {
15 $this->dataMapper = $dataMapper;
16 }
17
18 public function findById($id) {
19 return $this->dataMapper->findById($id, 'Simfile');
20 }
21
22 public function findRange($id, $limit)
23 {
24 return $this->dataMapper->findRange($id, 'Simfile', $limit);
25 }
26
27 public function save(ISimfile $entity) {
28 $this->dataMapper->save($entity);
29 }
30
31 //TODO: Implement
32 public function remove(ISimfile $entity) {
33 ;
34 }
35 }