Completed
Pull Request — develop (#241)
by ANTHONIUS
08:03
created

Connection::isSecure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
6
 * @license   MIT
7
 */
8
9
namespace Solr\Options;
10
11
12
use Zend\Stdlib\AbstractOptions;
13
14
class Connection extends AbstractOptions
15
{
16
    /**
17
     * @var bool
18
     */
19
    protected $secure = false;
20
21
    /**
22
     * @var string
23
     */
24
    protected $hostname = 'localhost';
25
26
    /**
27
     * @var integer
28
     */
29
    protected $port = 80;
30
31
    /**
32
     * @var string
33
     */
34
    protected $path = '/solr';
35
36
    /**
37
     * @var string
38
     */
39
    protected $username = '';
40
41
    /**
42
     * @var string
43
     */
44
    protected $password = '';
45
46
    /**
47
     * @return boolean
48
     */
49
    public function isSecure()
50
    {
51
        return $this->secure;
52
    }
53
54
    /**
55
     * @param boolean $secure
56
     * @return Connection
57
     */
58
    public function setSecure($secure)
59
    {
60
        $this->secure = $secure;
61
62
        return $this;
63
    }
64
    
65
    /**
66
     * @return string
67
     */
68
    public function getHostname()
69
    {
70
        return $this->hostname;
71
    }
72
73
    /**
74
     * @param string $hostname
75
     * @return Connection
76
     */
77
    public function setHostname($hostname)
78
    {
79
        $this->hostname = $hostname;
80
81
        return $this;
82
    }
83
84
    /**
85
     * @return int
86
     */
87
    public function getPort()
88
    {
89
        return $this->port;
90
    }
91
92
    /**
93
     * @param int $port
94
     * @return Connection
95
     */
96
    public function setPort($port)
97
    {
98
        $this->port = $port;
99
100
        return $this;
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getPath()
107
    {
108
        return $this->path;
109
    }
110
111
    /**
112
     * @param string $path
113
     * @return Connection
114
     */
115
    public function setPath($path)
116
    {
117
        $this->path = $path;
118
119
        return $this;
120
    }
121
122
    /**
123
     * @return string
124
     */
125
    public function getUsername()
126
    {
127
        return $this->username;
128
    }
129
130
    /**
131
     * @param string $username
132
     * @return Connection
133
     */
134
    public function setUsername($username)
135
    {
136
        $this->username = $username;
137
138
        return $this;
139
    }
140
141
    /**
142
     * @return string
143
     */
144
    public function getPassword()
145
    {
146
        return $this->password;
147
    }
148
149
    /**
150
     * @param string $password
151
     * @return Connection
152
     */
153
    public function setPassword($password)
154
    {
155
        $this->password = $password;
156
157
        return $this;
158
    }
159
}