Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
location.php
1<?php
2
4
7
8class Location extends BaseProperty
9{
13 private ?string $actualLocation;
17 private ?string $originalLocation;
18
23 public function __construct(?string $actualLocation, ?string $originalLocation = '')
24 {
25 $this->actualLocation = $actualLocation ? Emoji::decode($actualLocation) : $actualLocation;
26 $this->originalLocation = $originalLocation ? Emoji::decode($originalLocation) : $originalLocation;
27 }
28
32 public function getFields(): array
33 {
34 return [
35 'NEW' => $this->actualLocation,
36 'OLD' => $this->originalLocation,
37 ];
38 }
39
44 public function setActualLocation(string $actualLocation): Location
45 {
46 $this->actualLocation = Emoji::decode($actualLocation);
47
48 return $this;
49 }
50
55 public function setOriginalLocation(string $originalLocation): Location
56 {
57 $this->originalLocation = Emoji::decode($originalLocation);
58
59 return $this;
60 }
61
65 public function getActualLocation(): string
66 {
67 return $this->actualLocation;
68 }
69
73 public function getOriginalLocation(): string
74 {
75 return $this->originalLocation;
76 }
77
81 public function toString(): string
82 {
83 return $this->actualLocation;
84 }
85}
setOriginalLocation(string $originalLocation)
Definition location.php:55
__construct(?string $actualLocation, ?string $originalLocation='')
Definition location.php:23