|
|
@ -168,11 +168,23 @@ class ImmutableCollection implements IImmutableCollection {
|
|
|
|
throw new ImmutableException();
|
|
|
|
throw new ImmutableException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* List of properties to {@see https://www.php.net/manual/function.serialize.php serialize}
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return array[] List of properties to {@see https://www.php.net/manual/function.serialize.php serialize}
|
|
|
|
|
|
|
|
*/
|
|
|
|
public function __serialize (): array {
|
|
|
|
public function __serialize (): array {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
'elements' => $this->elements,
|
|
|
|
'elements' => $this->elements,
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* {@see https://www.php.net/manual/function.unserialize.php Unserialize} from the list of serialized properties
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param array $data The list of serialized properties
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return void
|
|
|
|
|
|
|
|
*/
|
|
|
|
public function __unserialize (array $data): void {
|
|
|
|
public function __unserialize (array $data): void {
|
|
|
|
$this->_initialize($data['elements']);
|
|
|
|
$this->_initialize($data['elements']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|