7 abstract protected function has(
string $key ): bool;
9 abstract protected function update(
string $key, $value );
19 if ( $mergeStrategy && $this->
has( $key ) && is_array( $newValue ) ) {
20 $oldValue = $this->
get( $key );
21 if ( $oldValue && is_array( $oldValue ) ) {
22 $newValue = $mergeStrategy->merge( $oldValue, $newValue );
25 $this->
update( $key, $newValue );
33 foreach ( $values as $key => $value ) {
34 $this->
set( $key, $value, $mergeStrategies[$key] ?? null );
47 if ( $this->has( $key ) ) {
48 if ( $mergeStrategy && $defaultValue && is_array( $defaultValue ) ) {
49 $customValue = $this->
get( $key );
50 if ( is_array( $customValue ) ) {
51 $newValue = $mergeStrategy->merge( $defaultValue, $customValue );
52 $this->update( $key, $newValue );
56 $this->update( $key, $defaultValue );
66 foreach ( $defaults as $key => $defaultValue ) {
67 $this->setDefault( $key, $defaultValue, $mergeStrategies[$key] ??
null );
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.