|
|
@@ -44,19 +44,10 @@ abstract class Handler implements HandlerInterface
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public function __sleep()
|
|
|
+ public function __serialize(): array
|
|
|
{
|
|
|
$this->close();
|
|
|
|
|
|
- $reflClass = new \ReflectionClass($this);
|
|
|
-
|
|
|
- $keys = [];
|
|
|
- foreach ($reflClass->getProperties() as $reflProp) {
|
|
|
- if (!$reflProp->isStatic()) {
|
|
|
- $keys[] = $reflProp->getName();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return $keys;
|
|
|
+ return (array) $this;
|
|
|
}
|
|
|
}
|