storage test
[m6w6/pq-gateway] / lib / pq / Mapper / StorageInterface.php
index bb5c94a0f02207d9adf1172a5163eb86f5f6d4a1..eb75f633b63fdfe9d2ce375a71ec60d719c4b5b2 100644 (file)
@@ -4,6 +4,13 @@ namespace pq\Mapper;
 
 interface StorageInterface
 {
+       /**
+        * Find by PK
+        * @param mixed $pk
+        * @return object
+        */
+       function get($pk);
+       
        /**
         * Find
         * @param array $where
@@ -25,4 +32,19 @@ interface StorageInterface
         * @param object $object
         */
        function save($object);
+
+       /**
+        * Buffer in a transaction
+        */
+       function buffer();
+
+       /**
+        * Commit
+        */
+       function flush();
+
+       /**
+        * Rollback
+        */
+       function discard();
 }