2017-12-15 03:05:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository;
|
|
|
|
|
|
|
|
interface SettingsRepositoryInterface extends RepositoryInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Store a new persistent setting in the database.
|
|
|
|
*
|
2018-01-05 04:49:50 +00:00
|
|
|
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
2017-12-15 03:05:26 +00:00
|
|
|
*/
|
2018-02-03 18:28:39 +00:00
|
|
|
public function set(string $key, string $value = null);
|
2017-12-15 03:05:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieve a persistent setting from the database.
|
|
|
|
*
|
2019-09-06 04:32:57 +00:00
|
|
|
* @param mixed $default
|
2021-01-23 20:33:34 +00:00
|
|
|
*
|
2017-12-15 03:05:26 +00:00
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function get(string $key, $default);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove a key from the database cache.
|
|
|
|
*/
|
|
|
|
public function forget(string $key);
|
|
|
|
}
|