Application.php
1 year ago
ApplicationCollection.php
1 year ago
BaseObject.php
1 year ago
Campaign.php
1 year ago
CampaignCapping.php
1 year ago
CampaignCollection.php
1 year ago
CampaignSchedule.php
1 year ago
CampaignSchedulePressure.php
1 year ago
CampaignScheduleUrlCriterion.php
1 year ago
CampaignStats.php
1 year ago
CampaignSuccessResponse.php
1 year ago
CampaignUrlFilters.php
1 year ago
Collection.php
1 year ago
DeliveriesCreateResponse.php
1 year ago
Event.php
1 year ago
FrequentFieldValues.php
1 year ago
GeoLocation.php
1 year ago
Installation.php
1 year ago
InstallationApplication.php
1 year ago
InstallationApplicationApple.php
1 year ago
InstallationCollection.php
1 year ago
InstallationDevice.php
1 year ago
InstallationDeviceCapabilities.php
1 year ago
InstallationDeviceConfiguration.php
1 year ago
InstallationPreferences.php
1 year ago
InstallationPushToken.php
1 year ago
Notification.php
1 year ago
NotificationAlert.php
1 year ago
NotificationAlertAndroid.php
1 year ago
NotificationAlertAndroidButton.php
1 year ago
NotificationAlertIos.php
1 year ago
NotificationAlertIosAttachment.php
1 year ago
NotificationAlertIosForeground.php
1 year ago
NotificationAlertWeb.php
1 year ago
NotificationAlertWebButton.php
1 year ago
NotificationButton.php
1 year ago
NotificationButtonAction.php
1 year ago
NotificationButtonActionEvent.php
1 year ago
NotificationInApp.php
1 year ago
NotificationInAppButton.php
1 year ago
NotificationInAppMap.php
1 year ago
NotificationInAppMapPlace.php
1 year ago
NotificationPush.php
1 year ago
NotificationPushAndroid.php
1 year ago
NotificationPushIos.php
1 year ago
NotificationPushWeb.php
1 year ago
NullObject.php
1 year ago
Pagination.php
1 year ago
Segment.php
1 year ago
SegmentCollection.php
1 year ago
SuccessResponse.php
1 year ago
User.php
1 year ago
WebSdkInitOptions.php
1 year ago
FrequentFieldValues.php
94 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WonderPush\Obj; |
| 4 | |
| 5 | if (count(get_included_files()) === 1) { http_response_code(403); exit(); } // Prevent direct access |
| 6 | |
| 7 | class ValueOccurrence extends BaseObject { |
| 8 | |
| 9 | /** @var int */ |
| 10 | private $occurrences; |
| 11 | |
| 12 | /** @var string */ |
| 13 | private $value; |
| 14 | |
| 15 | /** |
| 16 | * @return int |
| 17 | */ |
| 18 | public function getOccurrences() { |
| 19 | return $this->occurrences; |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * @param int $occurrences |
| 24 | * @return ValueOccurrence |
| 25 | */ |
| 26 | public function setOccurrences($occurrences) { |
| 27 | $this->occurrences = $occurrences; |
| 28 | return $this; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * @return string |
| 33 | */ |
| 34 | public function getValue() { |
| 35 | return $this->value; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * @param string $value |
| 40 | * @return ValueOccurrence |
| 41 | */ |
| 42 | public function setValue($value) { |
| 43 | $this->value = $value; |
| 44 | return $this; |
| 45 | } |
| 46 | |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * DTO for frequent field values. |
| 51 | * @codeCoverageIgnore |
| 52 | */ |
| 53 | class FrequentFieldValues extends BaseObject { |
| 54 | |
| 55 | /** @var ValueOccurrence[] */ |
| 56 | private $data; |
| 57 | |
| 58 | /** @var int */ |
| 59 | private $cardinality; |
| 60 | |
| 61 | /** |
| 62 | * @return ValueOccurrence[] |
| 63 | */ |
| 64 | public function getData() { |
| 65 | return $this->data; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * @param ValueOccurrence[] $data |
| 70 | * @return FrequentFieldValues |
| 71 | */ |
| 72 | public function setData($data) { |
| 73 | $this->data = BaseObject::instantiateForSetter('\WonderPush\Obj\ValueOccurrence[]', $data); |
| 74 | return $this; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * @return int |
| 79 | */ |
| 80 | public function getCardinality() { |
| 81 | return $this->cardinality; |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * @param int $cardinality |
| 86 | * @return FrequentFieldValues |
| 87 | */ |
| 88 | public function setCardinality($cardinality) { |
| 89 | $this->cardinality = $cardinality; |
| 90 | return $this; |
| 91 | } |
| 92 | |
| 93 | } |
| 94 |