diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php b/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php index 539863acb0e914d8e53d3973940c11308d54fdf3..acda47c2a2ab7763f663ef860c0b513ec8275cef 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php @@ -95,18 +95,6 @@ interface BackendInterface */ public function retrieve ($id, ParamBag $params = null); - /** - * Delete a single record. - * - * @param string $id Record identifier - * @param ParamBag $params Search backend parameters - * - * @return RecordCollectionInterface - * - * @todo Relocate to WritableBackendInterface - */ - public function delete ($id, ParamBag $params = null); - /** * Return similar records. * diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Feature/WritableBackendInterface.php b/module/VuFindSearch/src/VuFindSearch/Backend/Feature/WritableBackendInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..707dd04266198f8c6e3abaad84786536df62af91 --- /dev/null +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Feature/WritableBackendInterface.php @@ -0,0 +1,75 @@ +<?php + +/** + * Writeable backend feature interface definition. + * + * PHP version 5 + * + * Copyright (C) Villanova University 2010. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category VuFind2 + * @package Search + * @author David Maus <maus@hab.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link http://vufind.org + */ + +namespace VuFindSearch\Backend\Feature; + +use VuFindSearch\Backend\BackendInterface; +use VuFindSearch\ParamBag; + +/** + * Writeable backend feature interface definition. + * + * @category VuFind2 + * @package Search + * @author David Maus <maus@hab.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link http://vufind.org + */ +interface WriteableBackendInterface extends BackendInterface +{ + /** + * Delete a single record. + * + * @param string $id Record identifier + * @param ParamBag $params Search backend parameters + * + * @return void + */ + public function delete ($id, ParamBag $params = null); + + /** + * Delete all records. + * + * @param ParamBag $params Backend parameters + * + * @return void + */ + public function deleteAll (ParamBag $params = null); + + /** + * Update a single record. + * + * @param mixed $record Record + * @param ParamBag $params Backend parameters + * + * @return void + */ + public function update ($record, ParamBag $params = null); + +} \ No newline at end of file