designtopack/public/site/plugins/classes/location/FileDetails.php

27 lines
528 B
PHP
Raw Normal View History

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