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