Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
KeepAlive | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
__invoke | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * KeepAlive view helper |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) Villanova University 2010. |
9 | * Copyright (C) The National Library of Finland 2014. |
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 View_Helpers |
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 Main Site |
30 | */ |
31 | |
32 | namespace VuFind\View\Helper\Root; |
33 | |
34 | /** |
35 | * KeepAlive view helper |
36 | * |
37 | * @category VuFind |
38 | * @package View_Helpers |
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 Main Site |
43 | */ |
44 | class KeepAlive extends \Laminas\View\Helper\AbstractHelper |
45 | { |
46 | /** |
47 | * Keep-alive interval in seconds or 0 if disabled |
48 | * |
49 | * @var int |
50 | */ |
51 | protected $interval; |
52 | |
53 | /** |
54 | * Constructor |
55 | * |
56 | * @param int $interval Keep-alive interval in seconds or 0 if disabled |
57 | */ |
58 | public function __construct($interval) |
59 | { |
60 | $this->interval = $interval; |
61 | } |
62 | |
63 | /** |
64 | * Returns the keep-alive interval. |
65 | * |
66 | * @return int |
67 | */ |
68 | public function __invoke() |
69 | { |
70 | return $this->interval; |
71 | } |
72 | } |