diff options
Diffstat (limited to 'lib/Minz/ConfigurationSetterInterface.php')
| -rw-r--r-- | lib/Minz/ConfigurationSetterInterface.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Minz/ConfigurationSetterInterface.php b/lib/Minz/ConfigurationSetterInterface.php new file mode 100644 index 000000000..ac8c154ba --- /dev/null +++ b/lib/Minz/ConfigurationSetterInterface.php @@ -0,0 +1,19 @@ +<?php + +interface Minz_ConfigurationSetterInterface { + + /** + * Return whether the given key is supported by this setter. + * @param string $key the key to test. + * @return bool true if the key is supported, false otherwise. + */ + public function support(string $key): bool; + + /** + * Set the given key in data with the current value. + * @param array<string,mixed> $data an array containing the list of all configuration data. + * @param string $key the key to update. + * @param mixed $value the value to set. + */ + public function handle(&$data, string $key, $value): void; +} |
