Add start of Document class
All checks were successful
timw4mail/php-kilo/pipeline/head This commit looks good
All checks were successful
timw4mail/php-kilo/pipeline/head This commit looks good
This commit is contained in:
parent
31144fb2e3
commit
1b7e8216ef
18
src/Document.php
Normal file
18
src/Document.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user