Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
33.33% |
1 / 3 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
Deprecated | |
33.33% |
1 / 3 |
|
50.00% |
1 / 2 |
3.19 | |
0.00% |
0 / 1 |
supports | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getUrl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * Deprecated cover content loader (for backward-compatibility with deprecated |
5 | * settings). |
6 | * |
7 | * PHP version 8 |
8 | * |
9 | * Copyright (C) Villanova University 2020. |
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 Content |
26 | * @author Demian Katz <demian.katz@villanova.edu> |
27 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
28 | * @link https://vufind.org/wiki/development Wiki |
29 | */ |
30 | |
31 | namespace VuFind\Content\Covers; |
32 | |
33 | /** |
34 | * Deprecated cover content loader (for backward-compatibility with deprecated |
35 | * settings). |
36 | * |
37 | * @category VuFind |
38 | * @package Content |
39 | * @author Demian Katz <demian.katz@villanova.edu> |
40 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
41 | * @link https://vufind.org/wiki/development Wiki |
42 | */ |
43 | class Deprecated extends \VuFind\Content\AbstractCover |
44 | { |
45 | /** |
46 | * Does this plugin support the provided ID array? |
47 | * |
48 | * @param array $ids IDs that will later be sent to load() -- see below. |
49 | * |
50 | * @return bool |
51 | * |
52 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
53 | */ |
54 | public function supports($ids) |
55 | { |
56 | error_log('Deprecated cover provider called; check configuration.'); |
57 | return false; |
58 | } |
59 | |
60 | /** |
61 | * Get image URL for a particular API key and set of IDs (or false if invalid). |
62 | * |
63 | * @param string $key API key |
64 | * @param string $size Size of image to load (small/medium/large) |
65 | * @param array $ids Associative array of identifiers (keys may include 'isbn' |
66 | * pointing to an ISBN object and 'issn' pointing to a string) |
67 | * |
68 | * @return string|bool |
69 | * |
70 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
71 | */ |
72 | public function getUrl($key, $size, $ids) |
73 | { |
74 | return false; |
75 | } |
76 | } |