Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
SolrMarc | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
getURLs | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * Model for MARC records in Solr. |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) Villanova University 2010. |
9 | * Copyright (C) The National Library of Finland 2015. |
10 | * |
11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License version 2, |
13 | * as published by the Free Software Foundation. |
14 | * |
15 | * This program is distributed in the hope that it will be useful, |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. |
19 | * |
20 | * You should have received a copy of the GNU General Public License |
21 | * along with this program; if not, write to the Free Software |
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
23 | * |
24 | * @category VuFind |
25 | * @package RecordDrivers |
26 | * @author Demian Katz <demian.katz@villanova.edu> |
27 | * @author Ere Maijala <ere.maijala@helsinki.fi> |
28 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
29 | * @link https://vufind.org/wiki/development:plugins:record_drivers Wiki |
30 | */ |
31 | |
32 | namespace VuFind\RecordDriver; |
33 | |
34 | /** |
35 | * Model for MARC records in Solr. |
36 | * |
37 | * @category VuFind |
38 | * @package RecordDrivers |
39 | * @author Demian Katz <demian.katz@villanova.edu> |
40 | * @author Ere Maijala <ere.maijala@helsinki.fi> |
41 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
42 | * @link https://vufind.org/wiki/development:plugins:record_drivers Wiki |
43 | */ |
44 | class SolrMarc extends SolrDefault |
45 | { |
46 | use Feature\IlsAwareTrait { |
47 | Feature\IlsAwareTrait::getURLs as getIlsURLs; |
48 | } |
49 | use Feature\MarcReaderTrait; |
50 | use Feature\MarcAdvancedTrait { |
51 | Feature\MarcAdvancedTrait::getURLs as getMarcURLs; |
52 | } |
53 | |
54 | /** |
55 | * Return an array of associative URL arrays with one or more of the following |
56 | * keys: |
57 | * |
58 | * <li> |
59 | * <ul>desc: URL description text to display (optional)</ul> |
60 | * <ul>url: fully-formed URL (required if 'route' is absent)</ul> |
61 | * <ul>route: VuFind route to build URL with (required if 'url' is absent)</ul> |
62 | * <ul>routeParams: Parameters for route (optional)</ul> |
63 | * <ul>queryString: Query params to append after building route (optional)</ul> |
64 | * </li> |
65 | * |
66 | * @return array |
67 | */ |
68 | public function getURLs() |
69 | { |
70 | return array_merge( |
71 | $this->getMarcURLs(), |
72 | $this->getIlsURLs() |
73 | ); |
74 | } |
75 | } |