4
0

ConfigurationSetterInterface.php 604 B

1234567891011121314151617181920
  1. <?php
  2. declare(strict_types=1);
  3. interface Minz_ConfigurationSetterInterface {
  4. /**
  5. * Return whether the given key is supported by this setter.
  6. * @param string $key the key to test.
  7. * @return bool true if the key is supported, false otherwise.
  8. */
  9. public function support(string $key): bool;
  10. /**
  11. * Set the given key in data with the current value.
  12. * @param array<string,mixed> $data an array containing the list of all configuration data.
  13. * @param string $key the key to update.
  14. * @param mixed $value the value to set.
  15. */
  16. public function handle(&$data, string $key, $value): void;
  17. }