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 | /** |
3 | * Pop PHP Framework (https://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@noladev.com> |
7 | * @copyright Copyright (c) 2009-2025 NOLA Interactive, LLC. |
8 | * @license https://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop; |
15 | |
16 | use InvalidArgumentException; |
17 | |
18 | /** |
19 | * Application interface |
20 | * |
21 | * @category Pop |
22 | * @package Pop |
23 | * @author Nick Sagona, III <dev@noladev.com> |
24 | * @copyright Copyright (c) 2009-2025 NOLA Interactive, LLC. |
25 | * @license https://www.popphp.org/license New BSD License |
26 | * @version 4.3.5 |
27 | */ |
28 | interface ApplicationInterface |
29 | { |
30 | |
31 | /** |
32 | * Set name |
33 | * |
34 | * @param string $name |
35 | * @return static |
36 | */ |
37 | public function setName(string $name) : static; |
38 | |
39 | /** |
40 | * Get name |
41 | * |
42 | * @return string |
43 | */ |
44 | public function getName(): string; |
45 | |
46 | /** |
47 | * Determine if name is set |
48 | * |
49 | * @return bool |
50 | */ |
51 | public function hasName(): bool; |
52 | |
53 | /** |
54 | * Set version |
55 | * |
56 | * @param string $version |
57 | * @return static |
58 | */ |
59 | public function setVersion(string $version): static; |
60 | |
61 | /** |
62 | * Get version |
63 | * |
64 | * @return string |
65 | */ |
66 | public function getVersion(): string; |
67 | |
68 | /** |
69 | * Determine if version is set |
70 | * |
71 | * @return bool |
72 | */ |
73 | public function hasVersion(): bool; |
74 | |
75 | /** |
76 | * Access application config |
77 | * |
78 | * @return mixed |
79 | */ |
80 | public function config(): mixed; |
81 | |
82 | /** |
83 | * Load application |
84 | * |
85 | * @return ApplicationInterface |
86 | */ |
87 | public function load(): ApplicationInterface; |
88 | |
89 | /** |
90 | * Register a new configuration with the application |
91 | * |
92 | * @param mixed $config |
93 | * @throws InvalidArgumentException |
94 | * @return ApplicationInterface |
95 | */ |
96 | public function registerConfig(mixed $config): ApplicationInterface; |
97 | |
98 | /** |
99 | * Add new value to config |
100 | * |
101 | * @param string $name |
102 | * @param string $value |
103 | * @return ApplicationInterface |
104 | */ |
105 | public function addConfigValue(string $name, string $value): ApplicationInterface; |
106 | |
107 | /** |
108 | * Update existing value in config |
109 | * |
110 | * @param string $name |
111 | * @param string $value |
112 | * @return ApplicationInterface |
113 | */ |
114 | public function updateConfigValue(string $name, string $value): ApplicationInterface; |
115 | |
116 | /** |
117 | * Replace existing value in config |
118 | * |
119 | * @param string $name |
120 | * @return ApplicationInterface |
121 | */ |
122 | public function deleteConfigValue(string $name): ApplicationInterface; |
123 | |
124 | /** |
125 | * Merge new or altered config values with the existing config values |
126 | * |
127 | * @param mixed $config |
128 | * @param bool $preserve |
129 | * @return ApplicationInterface |
130 | */ |
131 | public function mergeConfig(mixed $config, bool $preserve = false): ApplicationInterface; |
132 | |
133 | } |