Initial Version
This commit is contained in:
54
shared/lib/Files/Node/INodeEntityBase.php
Normal file
54
shared/lib/Files/Node/INodeEntityBase.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\Files\Node;
|
||||
|
||||
/**
|
||||
* Interface for entity (file) nodes
|
||||
*
|
||||
* Entities are leaf nodes that contain actual file data.
|
||||
* They inherit common properties from INodeBase and add file-specific properties.
|
||||
*/
|
||||
interface INodeEntityBase extends INodeBase {
|
||||
|
||||
public const JSON_TYPE = 'files.entity';
|
||||
public const JSON_PROPERTY_SIZE = 'size';
|
||||
public const JSON_PROPERTY_MIME = 'mime';
|
||||
public const JSON_PROPERTY_FORMAT = 'format';
|
||||
public const JSON_PROPERTY_ENCODING = 'encoding';
|
||||
|
||||
/**
|
||||
* File size in bytes
|
||||
*
|
||||
* @since 2025.11.01
|
||||
*/
|
||||
public function size(): int;
|
||||
|
||||
/**
|
||||
* MIME type of the file (e.g., 'application/pdf', 'image/png')
|
||||
*
|
||||
* @since 2025.11.01
|
||||
*/
|
||||
public function getMime(): string|null;
|
||||
|
||||
/**
|
||||
* File format/extension (e.g., 'pdf', 'png', 'txt')
|
||||
*
|
||||
* @since 2025.11.01
|
||||
*/
|
||||
public function getFormat(): string|null;
|
||||
|
||||
/**
|
||||
* Character encoding (e.g., 'utf-8')
|
||||
*
|
||||
* @since 2025.11.01
|
||||
*/
|
||||
public function getEncoding(): string|null;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user