More dataaccess stuff.
[rock.divinelegy.git] / DataAccess / DataMapper / IDataMapper.php
1 <?php
2
3 namespace DataAccess\DataMapper;
4
5 use DataAccess\Queries\IQueryConstraints;
6 use Domain\Entities\IDivineEntity;
7
8 interface IDataMapper
9 {
10 //TODO: Table is the wrong name. We actually give the implementation the entity name and it finds the table from the maps.
11
12 //find in table based on constraints and return it as entity
13 public function map($entityName, $queryString);
14 //insert/update entity in table
15 public function save(IDivineEntity $entity);
16 //remove entity from table
17 public function remove(IDivineEntity $entity);
18 }