1<?php 2 3/* 4 * This file is part of the league/commonmark package. 5 * 6 * (c) Colin O'Dell <colinodell@gmail.com> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12namespace League\CommonMark\Util; 13 14interface ConfigurationInterface 15{ 16 /** 17 * @internal 18 * 19 * @deprecated 20 */ 21 public const MISSING = '833f2700-af8d-49d4-9171-4b5f12d3bfbc'; 22 23 /** 24 * Merge an existing array into the current configuration 25 * 26 * @param array<string, mixed> $config 27 * 28 * @return void 29 */ 30 public function merge(array $config = []); 31 32 /** 33 * Replace the entire array with something else 34 * 35 * @param array<string, mixed> $config 36 * 37 * @return void 38 */ 39 public function replace(array $config = []); 40 41 /** 42 * Return the configuration value at the given key, or $default if no such config exists 43 * 44 * The key can be a string or a slash-delimited path to a nested value 45 * 46 * @param string|null $key 47 * @param mixed|null $default 48 * 49 * @return mixed|null 50 */ 51 public function get(?string $key = null, $default = null); 52 53 /** 54 * Set the configuration value at the given key 55 * 56 * The key can be a string or a slash-delimited path to a nested value 57 * 58 * @param string $key 59 * @param mixed|null $value 60 * 61 * @return void 62 */ 63 public function set(string $key, $value = null); 64} 65