Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
HoldSettings | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getHoldsMode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getTitleHoldsMode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * ILS Hold Settings Class |
5 | * |
6 | * This class is responsible for determining hold settings for VuFind based |
7 | * on configuration and defaults. |
8 | * |
9 | * PHP version 8 |
10 | * |
11 | * Copyright (C) Villanova University 2007. |
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 ILS_Drivers |
28 | * @author Andrew S. Nagy <vufind-tech@lists.sourceforge.net> |
29 | * @author Demian Katz <demian.katz@villanova.edu> |
30 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
31 | * @link https://vufind.org/wiki/development:plugins:ils_drivers Wiki |
32 | */ |
33 | |
34 | namespace VuFind\ILS; |
35 | |
36 | /** |
37 | * ILS Hold Settings Class |
38 | * |
39 | * This class is responsible for determining hold settings for VuFind based |
40 | * on configuration and defaults. |
41 | * |
42 | * @category VuFind |
43 | * @package ILS_Drivers |
44 | * @author Andrew S. Nagy <vufind-tech@lists.sourceforge.net> |
45 | * @author Demian Katz <demian.katz@villanova.edu> |
46 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
47 | * @link https://vufind.org/wiki/development:plugins:ils_drivers Wiki |
48 | */ |
49 | class HoldSettings |
50 | { |
51 | /** |
52 | * ILS configuration |
53 | * |
54 | * @var \Laminas\Config\Config |
55 | */ |
56 | protected $config; |
57 | |
58 | /** |
59 | * Constructor |
60 | * |
61 | * @param \Laminas\Config\Config $config Configuration representing the [Catalog] |
62 | * section of config.ini |
63 | */ |
64 | public function __construct(\Laminas\Config\Config $config) |
65 | { |
66 | $this->config = $config; |
67 | } |
68 | |
69 | /** |
70 | * Get Holds Mode |
71 | * |
72 | * This is responsible for returning the holds mode |
73 | * |
74 | * @return string The Holds mode |
75 | */ |
76 | public function getHoldsMode() |
77 | { |
78 | return $this->config->holds_mode ?? 'all'; |
79 | } |
80 | |
81 | /** |
82 | * Get Title Holds Mode |
83 | * |
84 | * This is responsible for returning the Title holds mode |
85 | * |
86 | * @return string The Title Holds mode |
87 | */ |
88 | public function getTitleHoldsMode() |
89 | { |
90 | return $this->config->title_level_holds_mode ?? 'disabled'; |
91 | } |
92 | } |