|
1
|
|
|
<?php |
|
2
|
|
|
declare(strict_types=1); |
|
3
|
|
|
|
|
4
|
|
|
namespace AOE\Crawler\Value; |
|
5
|
|
|
|
|
6
|
|
|
/* |
|
7
|
|
|
* (c) 2020 AOE GmbH <[email protected]> |
|
8
|
|
|
* |
|
9
|
|
|
* This file is part of the TYPO3 Crawler Extension. |
|
10
|
|
|
* |
|
11
|
|
|
* It is free software; you can redistribute it and/or modify it under |
|
12
|
|
|
* the terms of the GNU General Public License, either version 2 |
|
13
|
|
|
* of the License, or any later version. |
|
14
|
|
|
* |
|
15
|
|
|
* For the full copyright and license information, please read the |
|
16
|
|
|
* LICENSE.txt file that was distributed with this source code. |
|
17
|
|
|
* |
|
18
|
|
|
* The TYPO3 project - inspiring people to share! |
|
19
|
|
|
*/ |
|
20
|
|
|
|
|
21
|
|
|
final class ModuleSettings |
|
22
|
|
|
{ |
|
23
|
|
|
/** |
|
24
|
|
|
* @var string |
|
25
|
|
|
*/ |
|
26
|
|
|
private $processListMode; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @var string |
|
30
|
|
|
*/ |
|
31
|
|
|
private $crawlAction; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @var int |
|
35
|
|
|
*/ |
|
36
|
|
|
private $depth; |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* @var bool |
|
40
|
|
|
*/ |
|
41
|
|
|
private $logResultLog; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @var int |
|
45
|
|
|
*/ |
|
46
|
|
|
private $itemsPerPage; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @var string |
|
50
|
|
|
*/ |
|
51
|
|
|
private $logDisplay; |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @var bool |
|
55
|
|
|
*/ |
|
56
|
|
|
private $logFeVars; |
|
57
|
|
|
|
|
58
|
1 |
|
public function __construct( |
|
59
|
|
|
string $processListMode, |
|
60
|
|
|
string $crawlAction, |
|
61
|
|
|
int $depth, |
|
62
|
|
|
bool $logResultLog, |
|
63
|
|
|
int $itemsPerPage, |
|
64
|
|
|
string $logDisplay, |
|
65
|
|
|
bool $logFeVars |
|
66
|
|
|
) |
|
67
|
|
|
{ |
|
68
|
1 |
|
$this->processListMode = $processListMode; |
|
69
|
1 |
|
$this->crawlAction = $crawlAction; |
|
70
|
1 |
|
$this->depth = $depth; |
|
71
|
1 |
|
$this->logResultLog = $logResultLog; |
|
72
|
1 |
|
$this->itemsPerPage = $itemsPerPage; |
|
73
|
1 |
|
$this->logDisplay = $logDisplay; |
|
74
|
1 |
|
$this->logFeVars = $logFeVars; |
|
75
|
|
|
|
|
76
|
1 |
|
} |
|
77
|
|
|
|
|
78
|
1 |
|
public static function fromArray(array $array): self |
|
79
|
|
|
{ |
|
80
|
1 |
|
return new self( |
|
81
|
1 |
|
$array['processListMode'], |
|
82
|
1 |
|
$array['crawlaction'], |
|
83
|
1 |
|
$array['depth'], |
|
84
|
1 |
|
$array['log_resultLog'], |
|
85
|
1 |
|
$array['itemPerPage'], |
|
86
|
1 |
|
$array['log_display'], |
|
87
|
1 |
|
$array['log_feVars'] |
|
88
|
|
|
); |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* @return string |
|
93
|
|
|
*/ |
|
94
|
1 |
|
public function getProcessListMode(): string |
|
95
|
|
|
{ |
|
96
|
1 |
|
return $this->processListMode; |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @return string |
|
101
|
|
|
*/ |
|
102
|
1 |
|
public function getCrawlAction(): string |
|
103
|
|
|
{ |
|
104
|
1 |
|
return $this->crawlAction; |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* @return int |
|
109
|
|
|
*/ |
|
110
|
1 |
|
public function getDepth(): int |
|
111
|
|
|
{ |
|
112
|
1 |
|
return $this->depth; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @return bool |
|
117
|
|
|
*/ |
|
118
|
1 |
|
public function isLogResultLog(): bool |
|
119
|
|
|
{ |
|
120
|
1 |
|
return $this->logResultLog; |
|
121
|
|
|
} |
|
122
|
|
|
|
|
123
|
|
|
/** |
|
124
|
|
|
* @return int |
|
125
|
|
|
*/ |
|
126
|
1 |
|
public function getItemsPerPage(): int |
|
127
|
|
|
{ |
|
128
|
1 |
|
return $this->itemsPerPage; |
|
129
|
|
|
} |
|
130
|
|
|
|
|
131
|
|
|
/** |
|
132
|
|
|
* @return string |
|
133
|
|
|
*/ |
|
134
|
1 |
|
public function getLogDisplay(): string |
|
135
|
|
|
{ |
|
136
|
1 |
|
return $this->logDisplay; |
|
137
|
|
|
} |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* @return bool |
|
141
|
|
|
*/ |
|
142
|
1 |
|
public function isLogFeVars(): bool |
|
143
|
|
|
{ |
|
144
|
1 |
|
return $this->logFeVars; |
|
145
|
|
|
} |
|
146
|
|
|
|
|
147
|
|
|
} |
|
148
|
|
|
|