Adapter
1 week ago
Decorator
1 week ago
AllDataAccessContainer.php
1 week ago
DeferredPersistentContainer.php
1 week ago
ElementNotExistsException.php
1 week ago
PersistentContainer.php
1 week ago
PersistentContainer.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | namespace FSVendor\WPDesk\Persistence; |
| 4 | |
| 5 | use FSVendor\Psr\Container\ContainerInterface; |
| 6 | /** |
| 7 | * Container that you can use to save some values. |
| 8 | * When class require only read capabilities use ContainerInterface. When requires to write use this interface. |
| 9 | * |
| 10 | * @package WPDesk\Persistence |
| 11 | */ |
| 12 | interface PersistentContainer extends ContainerInterface |
| 13 | { |
| 14 | /** |
| 15 | * Set value for a given key. |
| 16 | * |
| 17 | * @param string $id Identifier of the entry to look for. |
| 18 | * @param array|int|string|float $value Value should not be an object or callable. |
| 19 | * |
| 20 | * @return void |
| 21 | */ |
| 22 | public function set($id, $value); |
| 23 | /** |
| 24 | * Clear value from a given key. |
| 25 | * |
| 26 | * @param string $id Identifier of the entry to look for. |
| 27 | * |
| 28 | * @return void |
| 29 | */ |
| 30 | public function delete($id); |
| 31 | } |
| 32 |