Implement a better management interface for Settings (#809)
This commit is contained in:
parent
75eb506dab
commit
f9df463d32
40 changed files with 1274 additions and 383 deletions
32
app/Contracts/Repository/SettingsRepositoryInterface.php
Normal file
32
app/Contracts/Repository/SettingsRepositoryInterface.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Contracts\Repository;
|
||||
|
||||
interface SettingsRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Store a new persistent setting in the database.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @return mixed
|
||||
*/
|
||||
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
|
||||
* @return mixed
|
||||
*/
|
||||
public function forget(string $key);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue