1 | <?php |
||
14 | class CustomerRequest |
||
15 | { |
||
16 | const SOCIAL_NETWORK_FACEBOOK = 'facebook'; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | * @Type("string") |
||
21 | * @Accessor(getter="getFirstName") |
||
22 | * @Assert\Regex(pattern="/\d/", match=false, groups={"update"}) |
||
23 | * @Assert\Type("string", groups={"update"}) |
||
24 | * @Assert\Length(min=2, max=100, groups={"update"}) |
||
25 | * @Assert\NotBlank( |
||
26 | * message="not.blank", groups={"update"} |
||
27 | * ) |
||
28 | * @Expose |
||
29 | */ |
||
30 | protected $firstName; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | * @Type("string") |
||
35 | * @Accessor(getter="getLastName") |
||
36 | * @Assert\Regex(pattern="/\d/", match=false, groups={"update"}) |
||
37 | * @Assert\Type("string", groups={"update"}) |
||
38 | * @Assert\Length(min=2, max=100, groups={"update"}) |
||
39 | * @Assert\NotBlank( |
||
40 | * message="not.blank", groups={"update"} |
||
41 | * ) |
||
42 | * @Expose |
||
43 | */ |
||
44 | protected $lastName; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | * @Type("string") |
||
49 | * @Accessor(getter="getEmail") |
||
50 | * @Assert\Email(groups={"update"}) |
||
51 | * @Assert\Type("string", groups={"update"}) |
||
52 | * @Assert\Length(max=100, groups={"update"}) |
||
53 | * @Assert\NotBlank( |
||
54 | * message="not.blank", groups={"update"} |
||
55 | * ) |
||
56 | * @Expose |
||
57 | */ |
||
58 | protected $email; |
||
59 | |||
60 | /** |
||
61 | * @var string |
||
62 | * |
||
63 | * @Type("string") |
||
64 | * @Accessor(getter="getApiKey") |
||
65 | * @Expose |
||
66 | */ |
||
67 | protected $apiKey; |
||
68 | |||
69 | /** |
||
70 | * @var string |
||
71 | * |
||
72 | * @Type("string") |
||
73 | * @Accessor(getter="getSocialNetwork") |
||
74 | * @Assert\NotBlank(groups={"socialNetwork"}) |
||
75 | * @Assert\Choice(callback="getSocialNetworks", groups={"socialNetwork"}) |
||
76 | * @Expose |
||
77 | */ |
||
78 | protected $socialNetwork; |
||
79 | |||
80 | /** |
||
81 | * @var string |
||
82 | * |
||
83 | * @Type("string") |
||
84 | * @Accessor(getter="getSocialToken") |
||
85 | * @Assert\NotBlank(groups={"socialNetwork"}) |
||
86 | * @Expose |
||
87 | */ |
||
88 | protected $socialToken; |
||
89 | |||
90 | /** |
||
91 | * Get firstName. |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getFirstName() |
||
99 | |||
100 | /** |
||
101 | * Get lastName. |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | public function getLastName() |
||
109 | |||
110 | /** |
||
111 | * Get email. |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | public function getEmail() |
||
119 | |||
120 | /** |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getSocialNetwork() |
||
127 | |||
128 | /** |
||
129 | * @return array |
||
130 | */ |
||
131 | public static function getSocialNetworks() |
||
137 | |||
138 | /** |
||
139 | * @return string |
||
140 | */ |
||
141 | public function getSocialToken() |
||
145 | |||
146 | /** |
||
147 | * Set apiKey. |
||
148 | * |
||
149 | * @param string $apiKey |
||
150 | * |
||
151 | * @return mixed |
||
152 | */ |
||
153 | public function setApiKey($apiKey) |
||
159 | |||
160 | /** |
||
161 | * @return string |
||
162 | */ |
||
163 | public function getApiKey() |
||
167 | } |
||
168 |