28bc360106
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
37 lines
943 B
PHP
37 lines
943 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace KTXF\Chrono\Entity;
|
|
|
|
use KTXF\Json\JsonSerializableObject;
|
|
|
|
/**
|
|
* Common base of the typed chrono entity objects ({@see EventObject},
|
|
* {@see TaskObject}, {@see JournalObject}).
|
|
*
|
|
* Gives providers a single class to build or extend entity properties
|
|
* against without involving the entity node wrapper, and one home for the
|
|
* shared behavior: the type/schema markers and the JSON serialization /
|
|
* deserialization machinery inherited from JsonSerializableObject.
|
|
*/
|
|
abstract class EntityPropertiesBaseAbstract extends JsonSerializableObject implements EntityPropertiesBaseInterface {
|
|
|
|
public string $type = 'event';
|
|
public int $schema = 1;
|
|
|
|
public function type(): string {
|
|
return $this->type;
|
|
}
|
|
|
|
public function schema(): int {
|
|
return $this->schema;
|
|
}
|
|
|
|
}
|