Completed
Push — develop ( 2bcc31...c18594 )
by
unknown
08:20
created

ModuleOptions::setCountry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Geo\Options;
12
13
use Zend\Stdlib\AbstractOptions;
14
15
/**
16
 * ${CARET}
17
 * 
18
 * @author Carsten Bleek <[email protected]>
19
 */
20
class ModuleOptions extends AbstractOptions
21
{
22
23
    /**
24
     * Used geo location plugin. Possible values:
25
     *  - photon
26
     *  - geo
27
     * 
28
     * @var string $plugin
29
     */
30
    protected $plugin = "photon";
31
32
    /**
33
     * Used geo coder url. Take one of these URLs
34
     * - http://photon.yawik.org/api
35
     * - http://api.cross-solution.de/geo
36
     *
37
     * @var string
38
     */
39
    protected $geoCoderUrl = "http://photon.yawik.org/api";
40
41
    /**
42
     * Country currectly only affects the "geo" plugin. Possible values "DE","CH","FR","AT","IT"
43
     *
44
     * @var string
45
     */
46
    protected $country = "DE";
47
48
    /**
49
     * @param $plugin
50
     *
51
     * @return self
52
     */
53
    public function setPlugin($plugin)
54
    {
55
        $this->plugin = $plugin;
56
57
        return $this;
58
    }
59
60
    /**
61
     * @return mixed
62
     */
63
    public function getPlugin()
64
    {
65
        return $this->plugin;
66
    }
67
68
    /**
69
     * @param mixed $geoCoderUrl
70
     *
71
     * @return self
72
     */
73
    public function setGeoCoderUrl($geoCoderUrl)
74
    {
75
        $this->geoCoderUrl = $geoCoderUrl;
76
77
        return $this;
78
    }
79
80
    /**
81
     * @return mixed
82
     */
83
    public function getGeoCoderUrl()
84
    {
85
        return $this->geoCoderUrl;
86
    }
87
88
    /**
89
     * @param mixed $country
90
     *
91
     * @return self
92
     */
93
    public function setCountry($country)
94
    {
95
        $this->country = $country;
96
97
        return $this;
98
    }
99
100
    /**
101
     * @return mixed
102
     */
103
    public function getCountry()
104
    {
105
        return $this->country;
106
    }
107
}