2024-12-18 13:56:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
2024-12-18 15:05:42 +01:00
|
|
|
namespace adrienpayet\D2P\data\location;
|
2024-12-18 16:26:55 +01:00
|
|
|
use Kirby;
|
2024-12-18 13:56:21 +01:00
|
|
|
|
|
|
|
|
class FileDetails
|
|
|
|
|
{
|
|
|
|
|
public string $uuid;
|
|
|
|
|
public string $url;
|
2025-01-15 14:18:48 +01:00
|
|
|
public string $type;
|
2024-12-18 13:56:21 +01:00
|
|
|
|
2024-12-18 16:26:55 +01:00
|
|
|
public function __construct(Kirby\Cms\File $data)
|
2024-12-18 13:56:21 +01:00
|
|
|
{
|
|
|
|
|
$this->uuid = (string) $data->uuid();
|
|
|
|
|
$this->url = (string) $data->url();
|
2025-01-15 14:18:48 +01:00
|
|
|
$this->type = (string) $data->type();
|
2024-12-18 13:56:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function toArray() {
|
|
|
|
|
return [
|
|
|
|
|
"uuid" => $this->uuid,
|
2025-01-15 14:18:48 +01:00
|
|
|
"url" => $this->url,
|
|
|
|
|
"type" => $this->type
|
2024-12-18 13:56:21 +01:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|