Completed
Push — develop ( 147c5a...6fcae4 )
by
unknown
06:39
created

MailServiceOptions   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUsername() 0 6 2
A getUsername() 0 3 1
A setPassword() 0 6 2
A getPassword() 0 3 1
A setSsl() 0 6 2
A getSsl() 0 3 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 Core\Options;
12
13
use \Zend\Mail\Transport\SmtpOptions;
14
15
/**
16
 * ${CARET}
17
 * 
18
 * @author Carsten Bleek <[email protected]>
19
 */
20
class MailServiceOptions extends SmtpOptions
21
{
22
    /**
23
     * @var string Local client hostname
24
     */
25
    protected $name = 'localhost';
26
27
    /**
28
     * @var string
29
     */
30
    protected $connectionClass = 'smtp';
31
32
    /**
33
     * Connection configuration (passed to the underlying Protocol class)
34
     *
35
     * @var array
36
     */
37
    protected $connectionConfig = [];
38
39
    /**
40
     * @var string Remote SMTP hostname or IP
41
     */
42
    protected $host = '127.0.0.1';
43
44
    /**
45
     * @var int
46
     */
47
    protected $port = 25;
48
49
    /**
50
     * @var string
51
     */
52
    protected $ssl;
53
54
    /**
55
     * @var string username
56
     */
57
    protected $username;
58
59
    /**
60
     * @var string password
61
     */
62
    protected $password;
63
64
65
    public function setUsername($username) {
66
        if ($username) {
67
            $this->connectionConfig['username'] = $username;
68
        }
69
        return $this;
70
    }
71
72
    public function getUsername(){
73
        return $this->connectionConfig['username'];
74
    }
75
76
    public function setPassword($password) {
77
        if ($password) {
78
            $this->connectionConfig['password'] = $password;
79
        }
80
        return $this;
81
    }
82
83
    public function getPassword(){
84
        return $this->connectionConfig['password'];
85
    }
86
87
    public function setSsl($ssl) {
88
        if ($ssl) {
89
            $this->connectionConfig['ssl'] = $ssl;
90
        }
91
        return $this;
92
    }
93
94
    public function getSsl(){
95
        return $this->connectionConfig['ssl'];
96
    }
97
}