PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / trunk
Booking for Appointments and Events Calendar – Amelia vtrunk
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 2 months ago
GoogleCalendar.php
183 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 /** @var bool */
26 private $insertPendingAppointments;
27
28 /** @var bool */
29 private $includeBufferTime;
30
31 /** @var array */
32 private $title;
33
34 /** @var array */
35 private $description;
36
37 /**
38 * GoogleCalendar constructor.
39 *
40 * @param Token $token
41 * @param Name $calendarId
42 */
43 public function __construct(
44 Token $token,
45 Name $calendarId
46 ) {
47 $this->token = $token;
48 $this->calendarId = $calendarId;
49 $this->insertPendingAppointments = false;
50 $this->includeBufferTime = false;
51 $this->title = ['appointment' => '', 'event' => ''];
52 $this->description = ['appointment' => '', 'event' => ''];
53 }
54
55 /**
56 * @return Id
57 */
58 public function getId()
59 {
60 return $this->id;
61 }
62
63 /**
64 * @param Id $id
65 */
66 public function setId($id)
67 {
68 $this->id = $id;
69 }
70
71 /**
72 * @return Token
73 */
74 public function getToken()
75 {
76 return $this->token;
77 }
78
79 /**
80 * @param Token $token
81 */
82 public function setToken($token)
83 {
84 $this->token = $token;
85 }
86
87 /**
88 * @return Name
89 */
90 public function getCalendarId()
91 {
92 return $this->calendarId;
93 }
94
95 /**
96 * @param Name $calendarId
97 */
98 public function setCalendarId($calendarId)
99 {
100 $this->calendarId = $calendarId;
101 }
102
103 /**
104 * @return bool
105 */
106 public function getInsertPendingAppointments()
107 {
108 return $this->insertPendingAppointments;
109 }
110
111 /**
112 * @param bool $insertPendingAppointments
113 */
114 public function setInsertPendingAppointments($insertPendingAppointments)
115 {
116 $this->insertPendingAppointments = $insertPendingAppointments;
117 }
118
119 /**
120 * @return bool
121 */
122 public function getIncludeBufferTime()
123 {
124 return $this->includeBufferTime;
125 }
126
127 /**
128 * @param bool $includeBufferTime
129 */
130 public function setIncludeBufferTime($includeBufferTime)
131 {
132 $this->includeBufferTime = $includeBufferTime;
133 }
134
135 /**
136 * @return array
137 */
138 public function getTitle()
139 {
140 return $this->title;
141 }
142
143 /**
144 * @param array $title
145 */
146 public function setTitle($title)
147 {
148 $this->title = $title;
149 }
150
151 /**
152 * @return array
153 */
154 public function getDescription()
155 {
156 return $this->description;
157 }
158
159 /**
160 * @param array $description
161 */
162 public function setDescription($description)
163 {
164 $this->description = $description;
165 }
166
167 /**
168 * @return array
169 */
170 public function toArray()
171 {
172 return [
173 'id' => null !== $this->getId() ? $this->getId()->getValue() : null,
174 'token' => $this->getToken()->getValue(),
175 'calendarId' => null !== $this->getCalendarId() ? $this->getCalendarId()->getValue() : null,
176 'insertPendingAppointments' => $this->getInsertPendingAppointments(),
177 'includeBufferTime' => $this->getIncludeBufferTime(),
178 'title' => $this->getTitle(),
179 'description' => $this->getDescription(),
180 ];
181 }
182 }
183