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 / Booking / Event / CustomerBookingEventTicket.php
ameliabooking / src / Domain / Entity / Booking / Event Last commit date
CustomerBookingEventPeriod.php 6 months ago CustomerBookingEventTicket.php 6 months ago Event.php 3 months ago EventPeriod.php 6 months ago EventTag.php 2 months ago EventTicket.php 6 months ago
CustomerBookingEventTicket.php
130 lines
1 <?php
2
3 /**
4 * @copyright © Melograno Ventures. All rights reserved.
5 * @licence See LICENCE.md for license details.
6 */
7
8 namespace AmeliaBooking\Domain\Entity\Booking\Event;
9
10 use AmeliaBooking\Domain\ValueObjects\Number\Float\Price;
11 use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id;
12 use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue;
13
14 /**
15 * Class CustomerBookingEventTicket
16 *
17 * @package AmeliaBooking\Domain\Entity\Booking\Event
18 */
19 class CustomerBookingEventTicket
20 {
21 /** @var Id */
22 private $id;
23
24 /** @var Id */
25 private $customerBookingId;
26
27 /** @var Id */
28 protected $eventTicketId;
29
30 /** @var IntegerValue */
31 protected $persons;
32
33 /** @var Price */
34 protected $price;
35
36 /**
37 * @return Id
38 */
39 public function getId()
40 {
41 return $this->id;
42 }
43
44 /**
45 * @param Id $id
46 */
47 public function setId($id)
48 {
49 $this->id = $id;
50 }
51
52 /**
53 * @return Id
54 */
55 public function getCustomerBookingId()
56 {
57 return $this->customerBookingId;
58 }
59
60 /**
61 * @param Id $customerBookingId
62 */
63 public function setCustomerBookingId(Id $customerBookingId)
64 {
65 $this->customerBookingId = $customerBookingId;
66 }
67
68 /**
69 * @return Id
70 */
71 public function getEventTicketId()
72 {
73 return $this->eventTicketId;
74 }
75
76 /**
77 * @param Id $eventTicketId
78 */
79 public function setEventTicketId(Id $eventTicketId)
80 {
81 $this->eventTicketId = $eventTicketId;
82 }
83
84 /**
85 * @return IntegerValue
86 */
87 public function getPersons()
88 {
89 return $this->persons;
90 }
91
92 /**
93 * @param IntegerValue $persons
94 */
95 public function setPersons(IntegerValue $persons)
96 {
97 $this->persons = $persons;
98 }
99
100 /**
101 * @return Price
102 */
103 public function getPrice()
104 {
105 return $this->price;
106 }
107
108 /**
109 * @param Price $price
110 */
111 public function setPrice(Price $price)
112 {
113 $this->price = $price;
114 }
115
116 /**
117 * @return array
118 */
119 public function toArray()
120 {
121 return [
122 'id' => $this->getId() ? $this->getId()->getValue() : null,
123 'eventTicketId' => $this->getEventTicketId() ? $this->getEventTicketId()->getValue() : null,
124 'customerBookingId' => $this->getCustomerBookingId() ? $this->getCustomerBookingId()->getValue() : null,
125 'persons' => $this->getPersons() ? $this->getPersons()->getValue() : null,
126 'price' => $this->getPrice() ? $this->getPrice()->getValue() : null
127 ];
128 }
129 }
130