id = $id; $this->name = $name; $this->city = $city; $this->zip = $zip; $this->street = $street; $this->url = $url; } /** * Selected pickup point ID * * @return string|null */ public function getId(): ?string { return $this->id; } /** * Point name. * * @return string|null */ public function getName(): ?string { return $this->name; } /** * Link to official Packeta detail page. * * @return string|null */ public function getUrl(): ?string { return $this->url; } /** * Gets pickup point street. * * @return string|null */ public function getStreet(): ?string { return $this->street; } /** * Gets pickup point ZIP. * * @return string|null */ public function getZip(): ?string { return $this->zip; } /** * Gets pickup point city. * * @return string|null */ public function getCity(): ?string { return $this->city; } /** * Gets full address. * * @return string */ public function getFullAddress(): string { $afterCommaSection = implode( ' ', array_filter( [ $this->city, $this->zip, ] ) ); return implode( ', ', array_filter( [ $this->street, $afterCommaSection, ] ) ); } /** * Sets id. * * @param string|null $id Id. * * @return void */ public function setId( ?string $id ): void { $this->id = $id; } /** * Sets name. * * @param string|null $name Name. * * @return void */ public function setName( ?string $name ): void { $this->name = $name; } /** * Sets URL. * * @param string|null $url URL. * * @return void */ public function setUrl( ?string $url ): void { $this->url = $url; } /** * Sets street. * * @param string|null $street Street. * * @return void */ public function setStreet( ?string $street ): void { $this->street = $street; } /** * Sets ZIP. * * @param string|null $zip ZIP. * * @return void */ public function setZip( ?string $zip ): void { $this->zip = $zip; } /** * Sets city. * * @param string|null $city City. * * @return void */ public function setCity( ?string $city ): void { $this->city = $city; } }