1 | <?php |
||
4 | class Teacher |
||
5 | { |
||
6 | /** @var string */ |
||
7 | private $name; |
||
8 | |||
9 | /** @var string */ |
||
10 | private $email; |
||
11 | |||
12 | /** @var string */ |
||
13 | private $password; |
||
14 | |||
15 | /** @var string */ |
||
16 | private $image = ''; |
||
17 | |||
18 | /** @var string */ |
||
19 | private $phoneNumber = ''; |
||
20 | |||
21 | /** @var string */ |
||
22 | private $mobileNumber = ''; |
||
23 | |||
24 | /** @var string */ |
||
25 | private $timeZone = ''; |
||
26 | |||
27 | /** @var string */ |
||
28 | private $about = ''; |
||
29 | |||
30 | /** @var int */ |
||
31 | private $canScheduleClass = 0; |
||
32 | |||
33 | /** @var int */ |
||
34 | private $isActive = 1; |
||
35 | |||
36 | |||
37 | 14 | private function __construct($name, $email, $password) |
|
43 | |||
44 | /** |
||
45 | * @param string $name |
||
46 | * @param string $email |
||
47 | * @param string $password |
||
48 | * @return Teacher |
||
49 | */ |
||
50 | 14 | public static function build($name, $email, $password) |
|
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function __toString() |
||
62 | |||
63 | /** |
||
64 | * @param string $image |
||
65 | * @return self |
||
66 | */ |
||
67 | 1 | public function withImage($image) |
|
74 | |||
75 | /** |
||
76 | * @param string $phoneNumber |
||
77 | * @return self |
||
78 | */ |
||
79 | 1 | public function withPhoneNumber($phoneNumber) |
|
86 | |||
87 | /** |
||
88 | * @param string $mobileNumber |
||
89 | * @return self |
||
90 | */ |
||
91 | 1 | public function withMobileNumber($mobileNumber) |
|
98 | |||
99 | /** |
||
100 | * @param string $timeZone |
||
101 | * @return self |
||
102 | */ |
||
103 | 1 | public function withTimeZone($timeZone) |
|
110 | |||
111 | /** |
||
112 | * @param string $about |
||
113 | * @return self |
||
114 | */ |
||
115 | 1 | public function withAbout($about) |
|
122 | |||
123 | /** |
||
124 | * @param string $canScheduleClass |
||
125 | * @return self |
||
126 | */ |
||
127 | 1 | public function withCanScheduleClass($canScheduleClass) |
|
134 | |||
135 | /** |
||
136 | * @param string $isActive |
||
137 | * @return self |
||
138 | */ |
||
139 | 1 | public function withIsActive($isActive) |
|
146 | |||
147 | 10 | public function toArray() |
|
162 | } |
||
163 |