1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* webtrees-lib: MyArtJaub library for webtrees |
5
|
|
|
* |
6
|
|
|
* @package MyArtJaub\Webtrees |
7
|
|
|
* @subpackage GeoDispersion |
8
|
|
|
* @author Jonathan Jaubart <[email protected]> |
9
|
|
|
* @copyright Copyright (c) 2021-2022, Jonathan Jaubart |
10
|
|
|
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
declare(strict_types=1); |
14
|
|
|
|
15
|
|
|
namespace MyArtJaub\Webtrees\Common\GeoDispersion\Config; |
16
|
|
|
|
17
|
|
|
use Fisharebest\Webtrees\Tree; |
18
|
|
|
use Fisharebest\Webtrees\Module\ModuleInterface; |
19
|
|
|
use MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface; |
20
|
|
|
use Psr\Http\Message\ServerRequestInterface; |
21
|
|
|
use JsonSerializable; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Null Place Mapper configuration. |
25
|
|
|
* It does not contain any data, and can be used when no configuration is required. |
26
|
|
|
*/ |
27
|
|
|
class NullPlaceMapperConfig implements PlaceMapperConfigInterface |
28
|
|
|
{ |
29
|
|
|
/** |
30
|
|
|
* {@inheritDoc} |
31
|
|
|
* @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::get() |
32
|
|
|
*/ |
33
|
|
|
public function get(string $key, $default = null) |
34
|
|
|
{ |
35
|
|
|
return $default; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* {@inheritDoc} |
40
|
|
|
* @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::has() |
41
|
|
|
*/ |
42
|
|
|
public function has(string $key): bool |
43
|
|
|
{ |
44
|
|
|
return false; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* {@inheritDoc} |
49
|
|
|
* @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::jsonDeserialize() |
50
|
|
|
* |
51
|
|
|
* @param mixed $config |
52
|
|
|
* @return $this |
53
|
|
|
*/ |
54
|
|
|
public function jsonDeserialize($config): self |
55
|
|
|
{ |
56
|
|
|
return $this; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* {@inheritDoc} |
61
|
|
|
* @see JsonSerializable::jsonSerialize() |
62
|
|
|
*/ |
63
|
|
|
public function jsonSerialize() |
64
|
|
|
{ |
65
|
|
|
return []; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* {@inheritDoc} |
70
|
|
|
* @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::configContent() |
71
|
|
|
*/ |
72
|
|
|
public function configContent(ModuleInterface $module, Tree $tree): string |
73
|
|
|
{ |
74
|
|
|
return ''; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* {@inheritDoc} |
79
|
|
|
* @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::withConfigUpdate() |
80
|
|
|
* @return $this |
81
|
|
|
*/ |
82
|
|
|
public function withConfigUpdate(ServerRequestInterface $request): self |
83
|
|
|
{ |
84
|
|
|
return $this; |
85
|
|
|
} |
86
|
|
|
} |
87
|
|
|
|