diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2012-05-07 21:14:42 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2012-05-07 21:14:42 +0200 |
| commit | 5199f316fad43afc0657ece494ce8c5e18a4d78c (patch) | |
| tree | 3b14521407297de9b00c2fdc3b1799952c373d03 /src | |
| parent | 58919afe451ad5b2088d61ff1c856f44dd522b32 (diff) | |
| download | phorkie-5199f316fad43afc0657ece494ce8c5e18a4d78c.tar.gz phorkie-5199f316fad43afc0657ece494ce8c5e18a4d78c.zip | |
null adapter that is used when no search adapter is configured
Diffstat (limited to 'src')
| -rw-r--r-- | src/phorkie/Database/Adapter/Null/Indexer.php | 14 | ||||
| -rw-r--r-- | src/phorkie/Database/Adapter/Null/Search.php | 16 | ||||
| -rw-r--r-- | src/phorkie/Database/Adapter/Null/Setup.php | 9 |
3 files changed, 39 insertions, 0 deletions
diff --git a/src/phorkie/Database/Adapter/Null/Indexer.php b/src/phorkie/Database/Adapter/Null/Indexer.php new file mode 100644 index 0000000..afa9713 --- /dev/null +++ b/src/phorkie/Database/Adapter/Null/Indexer.php @@ -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 index 0000000..0731932 --- /dev/null +++ b/src/phorkie/Database/Adapter/Null/Search.php @@ -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 index 0000000..de23d0a --- /dev/null +++ b/src/phorkie/Database/Adapter/Null/Setup.php @@ -0,0 +1,9 @@ +<?php +namespace phorkie; + +class Database_Adapter_Null_Setup +{ + public function setup() {} +} + +?> |
