function DataPart::__wakeup
Overrides TextPart::__wakeup
1 method overrides DataPart::__wakeup()
- MessagePart::__wakeup in vendor/
symfony/ mime/ Part/ MessagePart.php
File
-
vendor/
symfony/ mime/ Part/ DataPart.php, line 147
Class
- DataPart
- @author Fabien Potencier <fabien@symfony.com>
Namespace
Symfony\Component\Mime\PartCode
public function __wakeup() : void {
$r = new \ReflectionProperty(AbstractPart::class, 'headers');
$r->setValue($this, $this->_headers);
unset($this->_headers);
if (!\is_array($this->_parent)) {
throw new \BadMethodCallException('Cannot unserialize ' . __CLASS__);
}
foreach ([
'body',
'charset',
'subtype',
'disposition',
'name',
'encoding',
] as $name) {
if (null !== $this->_parent[$name] && !\is_string($this->_parent[$name]) && !$this->_parent[$name] instanceof File) {
throw new \BadMethodCallException('Cannot unserialize ' . __CLASS__);
}
$r = new \ReflectionProperty(TextPart::class, $name);
$r->setValue($this, $this->_parent[$name]);
}
unset($this->_parent);
}