<?php

namespace adrienpayet\D2P\data\location;
use Kirby;

class ProjectDetails
{
    private string $title;
    private string $uri;
    private string $uuid;

    public function __construct(Kirby\Cms\Page $page)
    {
        $this->title = (string) $page->title();
        $this->uri = (string) $page->uri();
        $this->uuid = (string) $page->uuid();
    }

    public function toArray() {
        return [
            "title" => $this->title,
            "uri" => $this->uri,
            "uuid" => $this->uuid,
        ];
    }
}
