PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.8.1
4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 All 254 releases
give / src / License / DataTransferObjects / Download.php

Download.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.8.1, at src/License/DataTransferObjects/Download.php

42 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\License\DataTransferObjects;
4
5 /**
6 * @since 4.3.0
7 */
8 class Download
9 {
10 public int $index;
11 public int $attachmentId;
12 public string $thumbnailSize;
13 public string $name;
14 public string $file;
15 public string $condition;
16 public int $arrayIndex;
17 public string $pluginSlug;
18 public string $readme;
19 public string $currentVersion;
20
21 /**
22 * @since 4.3.0
23 */
24 public static function fromData(array $data): self
25 {
26 $self = new self();
27 $self->index = (int)($data['index'] ?? 0);
28 $self->attachmentId = (int)($data['attachment_id'] ?? 0);
29 $self->thumbnailSize = (string)($data['thumbnail_size'] ?? 'thumbnail');
30 $self->name = (string)($data['name'] ?? '');
31 $self->file = (string)($data['file'] ?? '');
32 $self->condition = (string)($data['condition'] ?? '');
33 $self->arrayIndex = (int)($data['array_index'] ?? 0);
34 $self->pluginSlug = (string)($data['plugin_slug'] ?? '');
35 $self->readme = (string)($data['readme'] ?? '');
36 $self->currentVersion = (string)($data['current_version'] ?? '');
37
38 return $self;
39 }
40 }
41
42