|
|
@ -7,10 +7,24 @@ namespace jrosset\ArrayClasses;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class ImmutableInsensitiveCaseArrayClass implements IImmutableArrayClass {
|
|
|
|
class ImmutableInsensitiveCaseArrayClass implements IImmutableArrayClass {
|
|
|
|
use TImmutableInternalArray {
|
|
|
|
use TImmutableInternalArray {
|
|
|
|
|
|
|
|
__construct as private __construct__TImmutableInternalArray;
|
|
|
|
has as private has__TImmutableInternalArray;
|
|
|
|
has as private has__TImmutableInternalArray;
|
|
|
|
get as private get__TImmutableInternalArray;
|
|
|
|
get as private get__TImmutableInternalArray;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @inheritDoc
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public function __construct ($initial = null, bool $throwsForNonExistentElement = true) {
|
|
|
|
|
|
|
|
$this->__construct__TImmutableInternalArray($initial, $throwsForNonExistentElement);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$arrayNew = [];
|
|
|
|
|
|
|
|
foreach ($this->array as $key => $value) {
|
|
|
|
|
|
|
|
$arrayNew[mb_strtolower($key)] = $value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->array = $arrayNew;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @inheritDoc
|
|
|
|
* @inheritDoc
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|