1: <?php
2: /*
3: * SimpleID
4: *
5: * Copyright (C) Kelvin Mo 2014-2025
6: *
7: * This program is free software; you can redistribute it and/or
8: * modify it under the terms of the GNU General Public
9: * License as published by the Free Software Foundation; either
10: * version 2 of the License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program; if not, write to the Free
19: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20: */
21:
22: namespace SimpleID\Store;
23:
24: /**
25: * Interface representing an item that can be stored using
26: * {@link StoreManager}.
27: */
28: interface Storable {
29: /**
30: * Returns the item type for this object
31: *
32: * @return string the item type
33: */
34: public function getStoreType();
35:
36: /**
37: * Returns the unique item ID for this object.
38: *
39: * @return string the ID for this object
40: */
41: public function getStoreID();
42:
43: /**
44: * Sets the unique item ID for this object
45: *
46: * The ID should be:
47: *
48: * - unique for all items of this type; and
49: * - able to be used as a file name.
50: *
51: * @param string $id the ID for this object
52: * @return void
53: */
54: public function setStoreID($id);
55: }
56:
57: ?>