3 namespace DataAccess\StepMania
;
5 use DataAccess\StepMania\ISimfileRepository
;
6 use DataAccess\DataMapper\IDataMapper
;
7 use Domain\Entities\StepMania\ISimfile
;
9 //TODO: Implement some sort of caching. Probably OK for now not to worry.
10 class SimfileRepository
implements ISimfileRepository
14 public function __construct(IDataMapper
$dataMapper) {
15 $this->dataMapper
= $dataMapper;
18 public function findById($id) {
19 return $this->dataMapper
->findById($id, 'Simfile');
22 public function findRange($id, $limit)
24 return $this->dataMapper
->findRange($id, 'Simfile', $limit);
27 public function save(ISimfile
$entity) {
28 $this->dataMapper
->save($entity);
32 public function remove(ISimfile
$entity) {