Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3/**
4 * Entity model interface for resource table
5 *
6 * PHP version 8
7 *
8 * Copyright (C) Villanova University 2024.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2,
12 * as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 *
23 * @category VuFind
24 * @package  Database
25 * @author   Demian Katz <demian.katz@villanova.edu>
26 * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
27 * @link     https://vufind.org/wiki/development:plugins:database_gateways Wiki
28 */
29
30namespace VuFind\Db\Entity;
31
32/**
33 * Entity model interface for resource table
34 *
35 * @category VuFind
36 * @package  Database
37 * @author   Demian Katz <demian.katz@villanova.edu>
38 * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
39 * @link     https://vufind.org/wiki/development:plugins:database_gateways Wiki
40 */
41interface ResourceEntityInterface extends EntityInterface
42{
43    /**
44     * Id getter
45     *
46     * @return int
47     */
48    public function getId(): int;
49
50    /**
51     * Record Id setter
52     *
53     * @param string $recordId recordId
54     *
55     * @return ResourceEntityInterface
56     */
57    public function setRecordId(string $recordId): ResourceEntityInterface;
58
59    /**
60     * Record Id getter
61     *
62     * @return string
63     */
64    public function getRecordId(): string;
65
66    /**
67     * Title setter
68     *
69     * @param string $title Title of the record.
70     *
71     * @return ResourceEntityInterface
72     */
73    public function setTitle(string $title): ResourceEntityInterface;
74
75    /**
76     * Title getter
77     *
78     * @return string
79     */
80    public function getTitle(): string;
81
82    /**
83     * Author setter
84     *
85     * @param ?string $author Author of the title.
86     *
87     * @return ResourceEntityInterface
88     */
89    public function setAuthor(?string $author): ResourceEntityInterface;
90
91    /**
92     * Year setter
93     *
94     * @param ?int $year Year title is published.
95     *
96     * @return ResourceEntityInterface
97     */
98    public function setYear(?int $year): ResourceEntityInterface;
99
100    /**
101     * Source setter
102     *
103     * @param string $source Source (a search backend ID).
104     *
105     * @return ResourceEntityInterface
106     */
107    public function setSource(string $source): ResourceEntityInterface;
108
109    /**
110     * Source getter
111     *
112     * @return string
113     */
114    public function getSource(): string;
115
116    /**
117     * Extra Metadata setter
118     *
119     * @param ?string $extraMetadata ExtraMetadata.
120     *
121     * @return ResourceEntityInterface
122     */
123    public function setExtraMetadata(?string $extraMetadata): ResourceEntityInterface;
124
125    /**
126     * Extra Metadata getter
127     *
128     * @return ?string
129     */
130    public function getExtraMetadata(): ?string;
131}