aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/ConfigurationSetterInterface.php
blob: 451d4cb0ebb40d5a6ce2327c6f4116e6abf7c244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
declare(strict_types=1);

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(array &$data, string $key, mixed $value): void;
}