Permalink
Browse files

Moved CRUD interface to the generic iface package

  • Loading branch information...
1 parent 32828d7 commit 18bc67b4e185f7894b670353dbb3ab5c77f063b2 gordonmcvey committed Apr 15, 2012
Showing with 43 additions and 0 deletions.
  1. +43 −0 iface/Crud.php
View
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Reefknot framework
+ *
+ * @copyright Gordian Solutions and Gordon McVey
+ * @license http://www.apache.org/licenses/LICENSE-2.0.txt Apache license V2.0
+ */
+
+namespace gordian\reefknot\iface;
+
+/**
+ * CRUD (Create/Read/Update/Delete) interface for objects that store data
+ *
+ * @author gordonmcvey
+ */
+interface Crud
+{
+ /**
+ * @param mixed $data
+ * @param string $key
+ * @return Crud
+ */
+ public function createItem ($data, $key);
+
+ /**
+ * @param string $key
+ * @return Crud
+ */
+ public function readItem ($key);
+
+ /**
+ * @param mixed $data
+ * @param string $key
+ * @return Crud
+ */
+ public function updateItem ($data, $key);
+
+ /**
+ * @param string $key
+ * @return Crud
+ */
+ public function deleteItem ($key);
+}

0 comments on commit 18bc67b

Please sign in to comment.