8016ef8b8cc13693ce368241f4c3f199d860ef6a
7 class Storage
implements StorageInterface
10 * The mapping of this storage
16 * The underlying table gateway
22 * Create a storage for $map
23 * @param MapInterface $map
25 function __construct(MapInterface
$map) {
27 $this->gateway
= $map->getGateway();
33 * @param string $order
38 function find($where = [], $order = null, $limit = null, $offset = null) {
39 /* @var pq\Gateway\Rowset $rowset */
40 $rowset = $this->gateway
->find($where, $order, $limit, $offset);
41 return $this->map
->mapAll($rowset);
46 * @param object $object
48 function delete($object) {
49 $cache = $this->map
->getObjects();
50 $row = $cache->asRow($object)->delete();
51 $cache->resetObject($row);
52 $cache->resetRow($object);
57 * @param object $object
59 function save($object) {
60 $this->map
->unmap($object);