Completed
Push — feature/code-analysis ( 1158f1...5e4834 )
by Jonathan
03:51
created

GeoDisplayOptions   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 107
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 107
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getMap() 0 3 1
A setMap() 0 4 1
A getMapLevel() 0 3 1
A setMapLevel() 0 4 1
A isUsingFlags() 0 3 1
A getMaxDetailsInGen() 0 3 1
A setMaxDetailsInGen() 0 4 1
A setUsingFlags() 0 4 1
1
<?php
2
/**
3
 * webtrees-lib: MyArtJaub library for webtrees
4
 *
5
 * @package MyArtJaub\Webtrees
6
 * @subpackage GeoDispersion
7
 * @author Jonathan Jaubart <[email protected]>
8
 * @copyright Copyright (c) 2009-2016, Jonathan Jaubart
9
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
 */
11
namespace MyArtJaub\Webtrees\Module\GeoDispersion\Model;
12
13
/**
14
 * Class holding options for displaying GeoAnalysis.
15
 */
16
class GeoDisplayOptions {
17
    
18
    /**
19
	 * Outline map to be used for diaplay
20
     * @var (null|OutlineMap) $map
21
     */
22
    protected $map;
23
    
24
	/**
25
	 * Level in the Gedcom hierarchy of the parent level of the outline map.
26
	 * @var int $map_level
27
	 */
28
    protected $map_level;
29
    
30
	/**
31
	 * Option to use flags in places display, instead of or in addition to the name.
32
	 * @var bool $use_flags
33
	 */
34
    protected $use_flags;
35
    
36
	/**
37
	 * Option to define the number of top places to display in the generation view.
38
	 * @var int $max_details_in_gen
39
	 */
40
    protected $max_details_in_gen;
41
    
42
    /**
43
	 * Get the outline map to use for display.
44
	 *
45
     * @return (OutlineMap|null)
46
     */
47
    public function getMap(){
48
        return $this->map;
49
    }
50
    
51
	/**
52
	 * Set the outline map to use for display.
53
	 *
54
     * @param (OutlineMap|null) $map
55
	 * @return self Enable method-chaining
56
     */
57
    public function setMap(OutlineMap $map = null) {
58
        $this->map = $map;
59
        return $this;
60
    }
61
    
62
	/**
63
	 * Get the level of the map parent place
64
	 *
65
	 * @return int
66
	 */
67
    public function getMapLevel(){
68
        return $this->map_level;
69
    }
70
    
71
	/**
72
	 * Set the level of the map parent place
73
	 *
74
	 * @param int $maplevel
75
	 * @return self Enable method-chaining
76
	 */
77
    public function setMapLevel($maplevel) {
78
        $this->map_level = $maplevel;
79
        return $this;
80
    }
81
    
82
	/**
83
	 * Get whether flags should be used in places display
84
	 *
85
	 * @return bool
86
	 */
87
    public function isUsingFlags(){
88
        return $this->use_flags;
89
    }
90
    
91
	/**
92
	 * Set whether flags should be used in places display
93
	 *
94
	 * @param bool $use_flags
95
	 * @return self Enable method-chaining
96
	 */
97
    public function setUsingFlags($use_flags) {
98
        $this->use_flags = $use_flags;
99
        return $this;
100
    }
101
    
102
	/**
103
	 * Get the number of Top Places in the generation view
104
	 *
105
	 * @return int
106
	 */
107
    public function getMaxDetailsInGen(){
108
        return $this->max_details_in_gen;
109
    }
110
    
111
	/**
112
	 * Set the number of Top Places in the generation view
113
	 *
114
	 * @param int $max_details_in_gen
115
	 * @return self Enable method-chaining
116
	 */
117
    public function setMaxDetailsInGen($max_details_in_gen) {
118
        $this->max_details_in_gen = $max_details_in_gen;
119
        return $this;
120
    }
121
                   
122
}
123