Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2015 (original work) Open Assessment Technologies SA; |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | namespace oat\taoRevision\model; |
| 23 | |
| 24 | use core_kernel_classes_Triple as Triple; |
| 25 | use oat\generis\model\OntologyRdfs; |
| 26 | |
| 27 | interface RevisionStorageInterface |
| 28 | { |
| 29 | public const SERVICE_ID = 'taoRevision/storage'; |
| 30 | |
| 31 | public const OPTION_PERSISTENCE = 'persistence'; |
| 32 | |
| 33 | /** |
| 34 | * @param Revision $revision |
| 35 | * @param Triple[] $data |
| 36 | * |
| 37 | * @return Revision |
| 38 | */ |
| 39 | public function addRevision(Revision $revision, array $data); |
| 40 | |
| 41 | /** |
| 42 | * |
| 43 | * @param string $resourceId |
| 44 | * @param int $version |
| 45 | * |
| 46 | * @return Revision |
| 47 | */ |
| 48 | public function getRevision(string $resourceId, int $version); |
| 49 | |
| 50 | /** |
| 51 | * |
| 52 | * @param string $resourceId |
| 53 | * |
| 54 | * @return Revision[] |
| 55 | */ |
| 56 | public function getAllRevisions(string $resourceId); |
| 57 | |
| 58 | /** |
| 59 | * |
| 60 | * @param Revision $revision |
| 61 | * core_kernel_classes_Triple[] $data |
| 62 | */ |
| 63 | public function getData(Revision $revision); |
| 64 | |
| 65 | /** |
| 66 | * @deprecated |
| 67 | * @see getResourcesDataByQuery |
| 68 | * @param string $query |
| 69 | * @param array $options |
| 70 | * @param string $predicate |
| 71 | * |
| 72 | * @return array |
| 73 | */ |
| 74 | public function getResourcesUriByQuery( |
| 75 | string $query, |
| 76 | array $options = [], |
| 77 | string $predicate = OntologyRdfs::RDFS_LABEL |
| 78 | ); |
| 79 | |
| 80 | public function getResourcesDataByQuery( |
| 81 | string $query, |
| 82 | array $options = [], |
| 83 | string $predicate = OntologyRdfs::RDFS_LABEL |
| 84 | ): array; |
| 85 | |
| 86 | /** |
| 87 | * @param array $variables |
| 88 | * |
| 89 | * @return Revision[] |
| 90 | */ |
| 91 | public function buildRevisionCollection(array $variables); |
| 92 | } |