1c3437056SNickeau<?php 2c3437056SNickeau 3c3437056SNickeau 4c3437056SNickeaunamespace ComboStrap; 5c3437056SNickeau 6c3437056SNickeau 7*04fd306cSNickeauuse ComboStrap\Meta\Api\Metadata; 8*04fd306cSNickeauuse ComboStrap\Meta\Api\MetadataStore; 9*04fd306cSNickeau 10c3437056SNickeau/** 11c3437056SNickeau * Interface ComboResource 12c3437056SNickeau * @package ComboStrap 13c3437056SNickeau * 14*04fd306cSNickeau * It's called ResourceCombo and not Resource because of 15c3437056SNickeau * https://www.php.net/manual/en/language.types.resource.php 16*04fd306cSNickeau * 17*04fd306cSNickeau * A resource is a just a wrapper around path that adds metadata functionalities 18*04fd306cSNickeau * 19*04fd306cSNickeau * @deprecated it's just a {@link Path} with a {@link PageId} that can be accessed with the web server, therefore it should be a {@link WikiPath} 20c3437056SNickeau */ 21c3437056SNickeauinterface ResourceCombo 22c3437056SNickeau{ 23c3437056SNickeau 24*04fd306cSNickeau 25c3437056SNickeau public function getReadStoreOrDefault(): MetadataStore; 26c3437056SNickeau 27c3437056SNickeau /** 28c3437056SNickeau * @return Path - a generic path system where the content raw resource is stored 29c3437056SNickeau * ie the file system url, the dokuwiki url 30c3437056SNickeau */ 31*04fd306cSNickeau public function getPathObject(): Path; 32c3437056SNickeau 33c3437056SNickeau /** 34*04fd306cSNickeau * @return Metadata - the global unique id 35c3437056SNickeau */ 36c3437056SNickeau public function getUid(): Metadata; 37c3437056SNickeau 38c3437056SNickeau 39c3437056SNickeau /** 40c3437056SNickeau * @return string - the resource type/name 41c3437056SNickeau * Example for page: page 42c3437056SNickeau * Used to locate the data in a datastore 43c3437056SNickeau * The table name for instance 44c3437056SNickeau */ 45c3437056SNickeau function getType(): string; 46c3437056SNickeau 47c3437056SNickeau /** 48c3437056SNickeau * @return string - the resource name 49c3437056SNickeau * (ie {@link ResourceName} 50c3437056SNickeau */ 51c3437056SNickeau function getName(): ?string; 52c3437056SNickeau 53c3437056SNickeau /** 54c3437056SNickeau * @return string - the name but not null 55c3437056SNickeau */ 56c3437056SNickeau function getNameOrDefault(): string; 57c3437056SNickeau 58c3437056SNickeau /** 59c3437056SNickeau * @return Metadata 60c3437056SNickeau */ 61*04fd306cSNickeau public function getUidObject(): Metadata; 62c3437056SNickeau 63c3437056SNickeau 64c3437056SNickeau} 65