php-kilo/src/Document.php

18 lines
346 B
PHP
Raw Normal View History

2021-03-10 16:24:02 -05:00
<?php declare(strict_types=1);
namespace Aviat\Kilo;
class Document {
private function __construct(
public array $rows = [],
public ?string $filename = NULL,
private bool $dirty = FALSE,
) {}
public static function open(?string $filename = NULL): self
{
// @TODO move logic from Editor
return new self(filename: $filename);
}
}