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 sitemap generator plugins |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) The National Library of Finland 2021. |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2, |
12 | * as published by the Free Software Foundation. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU General Public License |
20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 | * |
23 | * @category VuFind |
24 | * @package Sitemap |
25 | * @author Ere Maijala <ere.maijala@helsinki.fi> |
26 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
27 | * @link https://vufind.org/wiki/development:plugins:ils_drivers Wiki |
28 | */ |
29 | |
30 | namespace VuFind\Sitemap\Plugin; |
31 | |
32 | use VuFind\Sitemap\Sitemap; |
33 | |
34 | /** |
35 | * Interface for sitemap generator plugins |
36 | * |
37 | * @category VuFind |
38 | * @package Sitemap |
39 | * @author Ere Maijala <ere.maijala@helsinki.fi> |
40 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
41 | * @link https://vufind.org/wiki/development:plugins:ils_drivers Wiki |
42 | */ |
43 | interface GeneratorPluginInterface |
44 | { |
45 | /** |
46 | * Set plugin options. |
47 | * |
48 | * @param array $options Options |
49 | * |
50 | * @return void |
51 | */ |
52 | public function setOptions(array $options): void; |
53 | |
54 | /** |
55 | * Get the name of the sitemap used to create the sitemap file. This will be |
56 | * appended to the configured base name, and may be blank to use the base |
57 | * name without a suffix. |
58 | * |
59 | * @return string |
60 | */ |
61 | public function getSitemapName(): string; |
62 | |
63 | /** |
64 | * Whether the URLs generated by the plugin support VuFind's lng parameter |
65 | * |
66 | * @return bool |
67 | */ |
68 | public function supportsVuFindLanguages(): bool; |
69 | |
70 | /** |
71 | * Get update frequency. Empty string implies that the default from sitemap |
72 | * configuration should be used. |
73 | * |
74 | * @return string |
75 | */ |
76 | public function getFrequency(): string; |
77 | |
78 | /** |
79 | * Generate urls for the sitemap. |
80 | * |
81 | * May yield a string per URL or an array that defines language versions and/or |
82 | * frequency in addition to url. |
83 | * |
84 | * @return \Generator |
85 | */ |
86 | public function getUrls(): \Generator; |
87 | } |