Project structure change
This commit is contained in:
parent
bd1642957c
commit
837f126021
29 changed files with 298 additions and 254 deletions
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
namespace Helpers;
|
||||
|
||||
class Settings {
|
||||
const PROXY = ['proxy-host', 'proxy-port', 'proxy-username', 'proxy-password'];
|
||||
|
||||
static public function get(string $name): string {
|
||||
if (isset($_COOKIE[$name]) && !empty($_COOKIE[$name])) {
|
||||
return $_COOKIE[$name];
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
static public function exists(string $name): bool {
|
||||
return isset($_COOKIE[$name]);
|
||||
}
|
||||
|
||||
static public function set(string $name, string $value) {
|
||||
setcookie($name, $value, time()+60*60*24*30, '/', '', isset($_SERVER['HTTPS']), true);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue