Skip to content

Internals Vfs Storage Interfaces IStorageRepository

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

vfs\storage\interfaces\IStorageRepository

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/vfs/storage/interfaces/IStorageRepository.php · Snapshot 8411f4287706.

VFS includes package resource lookup, database-backed file metadata, filesystem collaborators, transient pools and persistent PHP-array caches.

Imports and dependencies

use vfs\storage\StorageEntry;
use vfs\storage\enums\EOwnerType;

IStorageRepository

Declaration and architectural role

interface IStorageRepository

Source description (behavioral corrections are recorded in Known discrepancies):

Interface IStorageRepository

Defines the persistence contract for StorageEntry objects (DIP). High-level modules (StorageManager) depend on this abstraction, not the concrete StorageRepository class.

Constants, enum cases, traits and properties

No own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.

Method index

Method Signature
fetchAll public function fetchAll(): array
fetchById public function fetchById(int $id): StorageEntry
fetchByOwner public function fetchByOwner(int $ownerId): array
fetchByName public function fetchByName(string $name): array
fetchByOwnerType public function fetchByOwnerType(EOwnerType $ownerType): array
fetchByOwnerTypeAndOwner public function fetchByOwnerTypeAndOwner(EOwnerType $ownerType, int $ownerId): array
fetchByOwnerAndName public function fetchByOwnerAndName(int $ownerId, string $name): ?StorageEntry
create public function create(StorageEntry $entry): StorageEntry
update public function update(StorageEntry $entry): bool
delete public function delete(StorageEntry $entry): bool

fetchAll

Source line 17

public function fetchAll(): array;

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

fetchById

Source line 19

public function fetchById(int $id): StorageEntry;

Parameters

Parameter Type, modifiers and default Purpose
$id int $id Record or runtime identifier selected by this operation.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

fetchByOwner

Source line 21

public function fetchByOwner(int $ownerId): array;

Parameters

Parameter Type, modifiers and default Purpose
$ownerId int $ownerId Owning record ID or null.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

fetchByName

Source line 23

public function fetchByName(string $name): array;

Parameters

Parameter Type, modifiers and default Purpose
$name string $name Named key/label selected by this API; its exact scope is shown by the implementation trace.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

fetchByOwnerType

Source line 25

public function fetchByOwnerType(EOwnerType $ownerType): array;

Parameters

Parameter Type, modifiers and default Purpose
$ownerType EOwnerType $ownerType Storage owner category; a matching registered strategy is required for registration.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

fetchByOwnerTypeAndOwner

Source line 27

public function fetchByOwnerTypeAndOwner(EOwnerType $ownerType, int $ownerId): array;

Parameters

Parameter Type, modifiers and default Purpose
$ownerType EOwnerType $ownerType Storage owner category; a matching registered strategy is required for registration.
$ownerId int $ownerId Owning record ID or null.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

fetchByOwnerAndName

Source line 29

public function fetchByOwnerAndName(int $ownerId, string $name): ?StorageEntry;

Parameters

Parameter Type, modifiers and default Purpose
$ownerId int $ownerId Owning record ID or null.
$name string $name Named key/label selected by this API; its exact scope is shown by the implementation trace.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

create

Source line 31

public function create(StorageEntry $entry): StorageEntry;

Parameters

Parameter Type, modifiers and default Purpose
$entry StorageEntry $entry Operation input; the exact use, validation and propagation are shown in the implementation trace.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

update

Source line 33

public function update(StorageEntry $entry): bool;

Parameters

Parameter Type, modifiers and default Purpose
$entry StorageEntry $entry Operation input; the exact use, validation and propagation are shown in the implementation trace.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

delete

Source line 35

public function delete(StorageEntry $entry): bool;

Parameters

Parameter Type, modifiers and default Purpose
$entry StorageEntry $entry Operation input; the exact use, validation and propagation are shown in the implementation trace.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

Related types

Clone this wiki locally