Config.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.2, at vendor/themewinter/email-notification-sdk/src/Config.php
| 1 | <?php |
| 2 | namespace ENS; |
| 3 | |
| 4 | class Config { |
| 5 | |
| 6 | /** |
| 7 | * Config storage. |
| 8 | * |
| 9 | * @var array |
| 10 | */ |
| 11 | protected static $config = []; |
| 12 | |
| 13 | /** |
| 14 | * Set a config value. |
| 15 | * |
| 16 | * @param string $key |
| 17 | * @param mixed $value |
| 18 | */ |
| 19 | public static function set( $key, $value ) { |
| 20 | self::$config[$key] = $value; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Get a config value. |
| 25 | * |
| 26 | * @param string $key |
| 27 | * @param mixed $default |
| 28 | * @return mixed |
| 29 | */ |
| 30 | public static function get( $key, $default = null ) { |
| 31 | return self::$config[$key] ?? $default; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Get all config values. |
| 36 | * |
| 37 | * @return array |
| 38 | */ |
| 39 | public static function all() { |
| 40 | return self::$config; |
| 41 | } |
| 42 | } |