5 class Storage
implements StorageInterface
9 * @var pq\Mapper\MapInterface
14 * @var \pq\Gateway\Table
18 function __construct(MapInterface
$map) {
20 $this->gateway
= $map->getGateway();
23 function find($where = [], $order = null, $limit = null, $offset = null) {
24 /* @var pq\Gateway\Rowset $rowset */
25 $rowset = $this->gateway
->find($where, $order, $limit, $offset);
26 return $this->map
->mapAll($rowset);
29 function delete($object) {
30 $cache = $this->map
->getObjects();
31 $row = $cache->asRow($object)->delete();
32 $cache->resetObject($row);
33 $cache->resetRow($object);
36 function save($object) {
37 $this->map
->unmap($object);