SecurityEvent::getApiKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @project Magento Bridge for Symfony 2.
5
 *
6
 * @author  Sébastien MALOT <[email protected]>
7
 * @license MIT
8
 * @url     <https://github.com/smalot/magento-bundle>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Smalot\MagentoBundle\Event;
15
16
use Smalot\Magento\RemoteAdapterInterface;
17
18
/**
19
 * Class SecurityEvent
20
 *
21
 * @package Smalot\MagentoBundle\Event
22
 */
23
class SecurityEvent extends AbstractEvent
24
{
25
    /**
26
     * @var string
27
     */
28
    protected $apiUser;
29
30
    /**
31
     * @var string
32
     */
33
    protected $apiKey;
34
35
    /**
36
     * @var string
37
     */
38
    protected $sessionId;
39
40
    /**
41
     * @param RemoteAdapterInterface $remoteAdapter
42
     * @param string                 $apiUser
43
     * @param string                 $apiKey
44
     * @param string                 $sessionId
45
     */
46
    public function __construct(RemoteAdapterInterface $remoteAdapter, $apiUser, $apiKey, $sessionId = null)
47
    {
48
        $this->remoteAdapter = $remoteAdapter;
49
        $this->apiUser       = $apiUser;
50
        $this->apiKey        = $apiKey;
51
        $this->sessionId     = $sessionId;
52
    }
53
54
    /**
55
     * @param string $apiUser
56
     */
57
    public function setApiUser($apiUser)
58
    {
59
        $this->apiUser = $apiUser;
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getApiUser()
66
    {
67
        return $this->apiUser;
68
    }
69
70
    /**
71
     * @param string $apiKey
72
     */
73
    public function setApiKey($apiKey)
74
    {
75
        $this->apiKey = $apiKey;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getApiKey()
82
    {
83
        return $this->apiKey;
84
    }
85
86
    /**
87
     * @param string $sessionId
88
     */
89
    public function setSessionId($sessionId)
90
    {
91
        $this->sessionId = $sessionId;
92
    }
93
94
    /**
95
     * @return string
96
     */
97
    public function getSessionId()
98
    {
99
        return $this->sessionId;
100
    }
101
}
102