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 | * Interface for Link Resolver Drivers |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) Royal Holloway, University of London |
9 | * |
10 | * last update: 2010-10-11 |
11 | * tested with X-Server SFX 3.2 |
12 | * |
13 | * This program is free software; you can redistribute it and/or modify |
14 | * it under the terms of the GNU General Public License version 2, |
15 | * as published by the Free Software Foundation. |
16 | * |
17 | * This program is distributed in the hope that it will be useful, |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. |
21 | * |
22 | * You should have received a copy of the GNU General Public License |
23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
25 | * |
26 | * @category VuFind |
27 | * @package Resolver_Drivers |
28 | * @author Graham Seaman <Graham.Seaman@rhul.ac.uk> |
29 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
30 | * @link https://vufind.org/wiki/development:plugins:link_resolver_drivers Wiki |
31 | */ |
32 | |
33 | namespace VuFind\Resolver\Driver; |
34 | |
35 | /** |
36 | * Resolver Specific Driver Class |
37 | * |
38 | * This interface class is the definition of the required methods for |
39 | * interacting with the local OpenURL resolver. |
40 | * |
41 | * @category VuFind |
42 | * @package Resolver_Drivers |
43 | * @author Graham Seaman <Graham.Seaman@rhul.ac.uk> |
44 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
45 | * @link https://vufind.org/wiki/development:plugins:link_resolver_drivers Wiki |
46 | */ |
47 | interface DriverInterface |
48 | { |
49 | /** |
50 | * Fetch Links |
51 | * |
52 | * Fetches a set of links corresponding to an OpenURL |
53 | * |
54 | * @param string $openURL openURL (url-encoded) |
55 | * |
56 | * @return string raw XML returned by resolver |
57 | */ |
58 | public function fetchLinks($openURL); |
59 | |
60 | /** |
61 | * Parse Links |
62 | * |
63 | * Parses an XML file returned by a link resolver |
64 | * and converts it to a standardised format for display |
65 | * |
66 | * @param string $xmlstr Raw XML returned by resolver |
67 | * |
68 | * @return array Array of values |
69 | */ |
70 | public function parseLinks($xmlstr); |
71 | |
72 | /** |
73 | * Get Resolver Url |
74 | * |
75 | * Transform the OpenURL as needed to get a working link to the resolver. |
76 | * |
77 | * @param string $openURL openURL (url-encoded) |
78 | * |
79 | * @return string Returns resolver specific url |
80 | */ |
81 | public function getResolverUrl($openURL); |
82 | |
83 | /** |
84 | * This controls whether a "More options" link will be shown below the fetched |
85 | * resolver links eventually linking to the resolver page previously being |
86 | * parsed. |
87 | * This is especially useful for resolver such as the JOP resolver returning |
88 | * XML which would not be of any immediate use for the user. |
89 | * |
90 | * @return bool |
91 | */ |
92 | public function supportsMoreOptionsLink(); |
93 | } |