Completed
Pull Request — master (#137)
by
unknown
11:35
created

Customer::getApiKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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