Completed
Pull Request — master (#137)
by
unknown
12:51
created

Customer::getApiKey()   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
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Component\Security\Core\User\UserInterface;
7
8
/**
9
 * User.
10
 *
11
 * @ORM\Table(name="customers")
12
 * @ORM\Entity(repositoryClass="AppBundle\Repository\CustomerRepository")
13
 */
14
class Customer implements UserInterface
15
{
16
    /**
17
     * @var int
18
     *
19
     * @ORM\Column(name="id", type="integer")
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="AUTO")
22
     */
23
    protected $id;
24
25
    /**
26
     * @var string
27
     *
28
     * @ORM\Column(name="firstname", type="string", length=100, nullable=true)
29
     */
30
    protected $firstname;
31
32
    /**
33
     * @var string
34
     *
35
     * @ORM\Column(name="lastname", type="string", length=100, nullable=true)
36
     */
37
    protected $lastname;
38
    /**
39
     * @var string
40
     *
41
     * @ORM\Column(name="email", type="string", length=100, nullable=true)
42
     */
43
    protected $email;
44
    /**
45
     * @var string
46
     *
47
     * @ORM\Column(name="username", type="string", length=100)
48
     */
49
    protected $username;
50
51
    /**
52
     * @var string
53
     *
54
     * @ORM\Column(name="apiKey", type="string", length=255, nullable=true)
55
     */
56
    private $apiKey;
57
58
    /**
59
     * @var string
60
     *
61
     * @ORM\Column(name="facebook_id", type="string", length=255, nullable=true, unique=true)
62
     */
63
    private $facebookID;
64
65
    /**
66
     * Get id.
67
     *
68
     * @return int
69
     */
70
    public function getId()
71
    {
72
        return $this->id;
73
    }
74
75
    /**
76
     * Set apiKey.
77
     *
78
     * @param string $apiKey
79
     *
80
     * @return Customer
81
     */
82
    public function setApiKey($apiKey)
83
    {
84
        $this->apiKey = $apiKey;
85
86
        return $this;
87
    }
88
89
    /**
90
     * Get apiKey.
91
     *
92
     * @return string
93
     */
94
    public function getApiKey()
95
    {
96
        return $this->apiKey;
97
    }
98
99
    public function getRoles()
100
    {
101
        return array('ROLE_API');
102
    }
103
104
    public function getPassword()
105
    {
106
    }
107
    public function getSalt()
108
    {
109
    }
110
    public function eraseCredentials()
111
    {
112
    }
113
114
    /**
115
     * Set facebookID.
116
     *
117
     * @param string $facebookID
118
     *
119
     * @return Customer
120
     */
121
    public function setFacebookID($facebookID)
122
    {
123
        $this->facebookID = $facebookID;
124
125
        return $this;
126
    }
127
128
    /**
129
     * Get facebookID.
130
     *
131
     * @return string
132
     */
133
    public function getFacebookID()
134
    {
135
        return $this->facebookID;
136
    }
137
138
    /**
139
     * Set usernameApi.
140
     *
141
     * @param string $username
142
     *
143
     * @return Customer
144
     */
145
    public function setUsername($username)
146
    {
147
        $this->username = $username;
148
149
        return $this;
150
    }
151
152
    /**
153
     * Get username.
154
     *
155
     * @return string
156
     */
157
    public function getUsername()
158
    {
159
        return $this->username;
160
    }
161
162
    /**
163
     * Set firstname.
164
     *
165
     * @param string $firstname
166
     *
167
     * @return Customer
168
     */
169
    public function setFirstname($firstname)
170
    {
171
        $this->firstname = $firstname;
172
173
        return $this;
174
    }
175
176
    /**
177
     * Get firstname.
178
     *
179
     * @return string
180
     */
181
    public function getFirstname()
182
    {
183
        return $this->firstname;
184
    }
185
186
    /**
187
     * Set lastname.
188
     *
189
     * @param string $lastname
190
     *
191
     * @return Customer
192
     */
193
    public function setLastname($lastname)
194
    {
195
        $this->lastname = $lastname;
196
197
        return $this;
198
    }
199
200
    /**
201
     * Get lastname.
202
     *
203
     * @return string
204
     */
205
    public function getLastname()
206
    {
207
        return $this->lastname;
208
    }
209
210
    /**
211
     * Set email.
212
     *
213
     * @param string $email
214
     *
215
     * @return Customer
216
     */
217
    public function setEmail($email)
218
    {
219
        $this->email = $email;
220
221
        return $this;
222
    }
223
224
    /**
225
     * Get email.
226
     *
227
     * @return string
228
     */
229
    public function getEmail()
230
    {
231
        return $this->email;
232
    }
233
}
234