Skip to content

Internals Vfs Storage Interfaces IOwnerStorageStrategy

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

vfs\storage\interfaces\IOwnerStorageStrategy

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/vfs/storage/interfaces/IOwnerStorageStrategy.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;

IOwnerStorageStrategy

Declaration and architectural role

interface IOwnerStorageStrategy

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

Interface IOwnerStorageStrategy

Defines the contract for owner-specific storage registration logic (OCP).

Adding support for a new EOwnerType no longer requires modifying StorageManager. Instead, a new strategy class implementing this interface is created and registered — open for extension, closed for modification.

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
supports public function supports(): EOwnerType
register public function register(StorageEntry $entry, string $ownerName): bool

supports

Source line 23

public function supports(): EOwnerType;

Returns the EOwnerType this strategy handles.

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

register

Source line 28

public function register(StorageEntry $entry, string $ownerName): 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.
$ownerName string $ownerName Operation input; the exact use, validation and propagation are shown in the implementation trace.

Executes the storage registration for this owner type.

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