PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Domain / Entity / Google / GoogleCalendar.php
ameliabooking / src / Domain / Entity / Google Last commit date
GoogleCalendar.php 3 years ago
GoogleCalendar.php
99 lines
1 <?php
2
3 namespace AmeliaBooking\Domain\Entity\Google;
4
5 use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id;
6 use AmeliaBooking\Domain\ValueObjects\String\Name;
7 use AmeliaBooking\Domain\ValueObjects\String\Token;
8
9 /**
10 * Class GoogleCalendar
11 *
12 * @package AmeliaBooking\Domain\Entity\Google
13 */
14 class GoogleCalendar
15 {
16 /** @var Id */
17 private $id;
18
19 /** @var Token */
20 private $token;
21
22 /** @var Name */
23 private $calendarId;
24
25 /**
26 * GoogleCalendar constructor.
27 *
28 * @param Token $token
29 * @param Name $calendarId
30 */
31 public function __construct(
32 Token $token,
33 Name $calendarId
34 ) {
35 $this->token = $token;
36 $this->calendarId = $calendarId;
37 }
38
39 /**
40 * @return Id
41 */
42 public function getId()
43 {
44 return $this->id;
45 }
46
47 /**
48 * @param Id $id
49 */
50 public function setId($id)
51 {
52 $this->id = $id;
53 }
54
55 /**
56 * @return Token
57 */
58 public function getToken()
59 {
60 return $this->token;
61 }
62
63 /**
64 * @param Token $token
65 */
66 public function setToken($token)
67 {
68 $this->token = $token;
69 }
70
71 /**
72 * @return Name
73 */
74 public function getCalendarId()
75 {
76 return $this->calendarId;
77 }
78
79 /**
80 * @param Name $calendarId
81 */
82 public function setCalendarId($calendarId)
83 {
84 $this->calendarId = $calendarId;
85 }
86
87 /**
88 * @return array
89 */
90 public function toArray()
91 {
92 return [
93 'id' => null !== $this->getId() ? $this->getId()->getValue() : null,
94 'token' => $this->getToken()->getValue(),
95 'calendarId' => null !== $this->getCalendarId() ? $this->getCalendarId()->getValue() : null,
96 ];
97 }
98 }
99