Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | declare(strict_types=1); |
| 3 | /** |
| 4 | * Pop PHP Framework (https://www.popphp.org/) |
| 5 | * |
| 6 | * @link https://github.com/popphp/popphp-framework |
| 7 | * @author Nick Sagona, III <nick@popphp.org> |
| 8 | * @copyright Copyright (c) 2009-2026 Nick Sagona, III |
| 9 | * @license https://www.popphp.org/license New BSD License |
| 10 | */ |
| 11 | |
| 12 | /** |
| 13 | * @namespace |
| 14 | */ |
| 15 | namespace Pop; |
| 16 | |
| 17 | use InvalidArgumentException; |
| 18 | |
| 19 | /** |
| 20 | * Application interface |
| 21 | * |
| 22 | * @category Pop |
| 23 | * @package Pop |
| 24 | * @author Nick Sagona, III <nick@popphp.org> |
| 25 | * @copyright Copyright (c) 2009-2026 Nick Sagona, III |
| 26 | * @license https://www.popphp.org/license New BSD License |
| 27 | * @version 5.0.0 |
| 28 | */ |
| 29 | interface ApplicationInterface |
| 30 | { |
| 31 | |
| 32 | /** |
| 33 | * Set name |
| 34 | * |
| 35 | * @param string $name |
| 36 | * @return static |
| 37 | */ |
| 38 | public function setName(string $name) : static; |
| 39 | |
| 40 | /** |
| 41 | * Get name |
| 42 | * |
| 43 | * @return string |
| 44 | */ |
| 45 | public function getName(): string; |
| 46 | |
| 47 | /** |
| 48 | * Determine if name is set |
| 49 | * |
| 50 | * @return bool |
| 51 | */ |
| 52 | public function hasName(): bool; |
| 53 | |
| 54 | /** |
| 55 | * Set full name |
| 56 | * |
| 57 | * @param string $fullName |
| 58 | * @return static |
| 59 | */ |
| 60 | public function setFullName(string $fullName) : static; |
| 61 | |
| 62 | /** |
| 63 | * Get full name |
| 64 | * |
| 65 | * @return string |
| 66 | */ |
| 67 | public function getFullName(): string; |
| 68 | |
| 69 | /** |
| 70 | * Determine if full name is set |
| 71 | * |
| 72 | * @return bool |
| 73 | */ |
| 74 | public function hasFullName(): bool; |
| 75 | |
| 76 | /** |
| 77 | * Set version |
| 78 | * |
| 79 | * @param string $version |
| 80 | * @return static |
| 81 | */ |
| 82 | public function setVersion(string $version): static; |
| 83 | |
| 84 | /** |
| 85 | * Get version |
| 86 | * |
| 87 | * @return string |
| 88 | */ |
| 89 | public function getVersion(): string; |
| 90 | |
| 91 | /** |
| 92 | * Determine if version is set |
| 93 | * |
| 94 | * @return bool |
| 95 | */ |
| 96 | public function hasVersion(): bool; |
| 97 | |
| 98 | /** |
| 99 | * Access application config |
| 100 | * |
| 101 | * @return mixed |
| 102 | */ |
| 103 | public function config(): mixed; |
| 104 | |
| 105 | /** |
| 106 | * Load application |
| 107 | * |
| 108 | * @return ApplicationInterface |
| 109 | */ |
| 110 | public function load(): ApplicationInterface; |
| 111 | |
| 112 | /** |
| 113 | * Register a new configuration with the application |
| 114 | * |
| 115 | * @param mixed $config |
| 116 | * @throws InvalidArgumentException |
| 117 | * @return ApplicationInterface |
| 118 | */ |
| 119 | public function registerConfig(mixed $config): ApplicationInterface; |
| 120 | |
| 121 | /** |
| 122 | * Add new value to config |
| 123 | * |
| 124 | * @param string $name |
| 125 | * @param string $value |
| 126 | * @return ApplicationInterface |
| 127 | */ |
| 128 | public function addConfigValue(string $name, string $value): ApplicationInterface; |
| 129 | |
| 130 | /** |
| 131 | * Update existing value in config |
| 132 | * |
| 133 | * @param string $name |
| 134 | * @param string $value |
| 135 | * @return ApplicationInterface |
| 136 | */ |
| 137 | public function updateConfigValue(string $name, string $value): ApplicationInterface; |
| 138 | |
| 139 | /** |
| 140 | * Replace existing value in config |
| 141 | * |
| 142 | * @param string $name |
| 143 | * @return ApplicationInterface |
| 144 | */ |
| 145 | public function deleteConfigValue(string $name): ApplicationInterface; |
| 146 | |
| 147 | /** |
| 148 | * Merge new or altered config values with the existing config values |
| 149 | * |
| 150 | * @param mixed $config |
| 151 | * @param bool $preserve |
| 152 | * @param array $exclude |
| 153 | * @return ApplicationInterface |
| 154 | */ |
| 155 | public function mergeConfig(mixed $config, bool $preserve = false, array $exclude = []): ApplicationInterface; |
| 156 | |
| 157 | } |