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.
|
|
|
|
*
|
|
|
|
* @param string $key
|
|
|
|
* @param string $value
|
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
|
|
|
*/
|
|
|
|
public function set(string $key, string $value);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieve a persistent setting from the database.
|
|
|
|
*
|
|
|
|
* @param string $key
|
|
|
|
* @param mixed $default
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function get(string $key, $default);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove a key from the database cache.
|
|
|
|
*
|
|
|
|
* @param string $key
|
|
|
|
*/
|
|
|
|
public function forget(string $key);
|
|
|
|
}
|