PluginProbe
Packeta / trunk
Packeta vtrunk
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
packeta / src / Packetery / Core / Entity / PickupPoint.php

PickupPoint.php in Packeta trunk, at src/Packetery/Core/Entity/PickupPoint.php

124 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Packetery\Core\Entity;
4
5 class PickupPoint {
6
7 /** @var string|null */
8 private $id;
9
10 /** @var string|null */
11 private $place;
12
13 /** @var string|null */
14 private $name;
15
16 /** @var string|null */
17 private $url;
18
19 /** @var string|null */
20 private $street;
21
22 /** @var string|null */
23 private $zip;
24
25 /** @var string|null */
26 private $city;
27
28 public function __construct(
29 ?string $id = null,
30 ?string $place = null,
31 ?string $name = null,
32 ?string $city = null,
33 ?string $zip = null,
34 ?string $street = null,
35 ?string $url = null
36 ) {
37 $this->id = $id;
38 $this->place = $place;
39 $this->name = $name;
40 $this->city = $city;
41 $this->zip = $zip;
42 $this->street = $street;
43 $this->url = $url;
44 }
45
46 public function getId(): ?string {
47 return $this->id;
48 }
49
50 public function getPlace(): ?string {
51 return $this->place;
52 }
53
54 public function getName(): ?string {
55 return $this->name;
56 }
57
58 public function getUrl(): ?string {
59 return $this->url;
60 }
61
62 public function getStreet(): ?string {
63 return $this->street;
64 }
65
66 public function getZip(): ?string {
67 return $this->zip;
68 }
69
70 public function getCity(): ?string {
71 return $this->city;
72 }
73
74 public function getFullAddress(): string {
75 $afterCommaSection = implode(
76 ' ',
77 array_filter(
78 [
79 $this->city,
80 $this->zip,
81 ]
82 )
83 );
84
85 return implode(
86 ', ',
87 array_filter(
88 [
89 $this->street,
90 $afterCommaSection,
91 ]
92 )
93 );
94 }
95
96 public function setId( ?string $id ): void {
97 $this->id = $id;
98 }
99
100 public function setPlace( ?string $place ): void {
101 $this->place = $place;
102 }
103
104 public function setName( ?string $name ): void {
105 $this->name = $name;
106 }
107
108 public function setUrl( ?string $url ): void {
109 $this->url = $url;
110 }
111
112 public function setStreet( ?string $street ): void {
113 $this->street = $street;
114 }
115
116 public function setZip( ?string $zip ): void {
117 $this->zip = $zip;
118 }
119
120 public function setCity( ?string $city ): void {
121 $this->city = $city;
122 }
123 }
124