null adapter that is used when no search adapter is configured
authorChristian Weiske <cweiske@cweiske.de>
Mon, 7 May 2012 19:14:42 +0000 (21:14 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 7 May 2012 19:14:42 +0000 (21:14 +0200)
src/phorkie/Database/Adapter/Null/Indexer.php [new file with mode: 0644]
src/phorkie/Database/Adapter/Null/Search.php [new file with mode: 0644]
src/phorkie/Database/Adapter/Null/Setup.php [new file with mode: 0644]

diff --git a/src/phorkie/Database/Adapter/Null/Indexer.php b/src/phorkie/Database/Adapter/Null/Indexer.php
new file mode 100644 (file)
index 0000000..afa9713
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+namespace phorkie;
+
+class Database_Adapter_Null_Indexer
+{
+    public function addRepo(Repository $repo, $crdate = null) {}
+
+    public function updateRepo(Repository $repo, $crdate = null) {}
+
+    public function deleteAllRepos() {}
+    public function deleteRepo(Repository $repo) {}
+}
+
+?>
diff --git a/src/phorkie/Database/Adapter/Null/Search.php b/src/phorkie/Database/Adapter/Null/Search.php
new file mode 100644 (file)
index 0000000..0731932
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+namespace phorkie;
+
+class Database_Adapter_Null_Search implements Database_ISearch
+{
+    public function search($term, $page = 0, $perPage = 10)
+    {
+        $sres = new Search_Result();
+        $sres->results = 0;
+        $sres->page    = $page;
+        $sres->perPage = $perPage;
+        return $sres;
+    }
+}
+
+?>
diff --git a/src/phorkie/Database/Adapter/Null/Setup.php b/src/phorkie/Database/Adapter/Null/Setup.php
new file mode 100644 (file)
index 0000000..de23d0a
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+namespace phorkie;
+
+class Database_Adapter_Null_Setup
+{
+    public function setup() {}
+}
+
+?>