/** * Unserialize array data * * @param string $serialized */ public function unserialize($serialized) { $data = unserialize($serialized); if (!is_array($data)) { throw new \UnexpectedValueException('Unserialized data is not an array'); } // TODO: check existence $this->message = CustomAmqpMessage::fromProperties($data['message']); $this->persistent = (bool) $data['persistent']; $this->mandatory = (bool) $data['mandatory']; $this->immediate = (bool) $data['immediate']; }
/** * Unserialize array data * * @param string $serialized */ public function unserialize($serialized) { $data = unserialize($serialized); if (!is_array($data)) { throw new \UnexpectedValueException('Unserialized data is not an array'); } // TODO: check existence $this->message = CustomAmqpMessage::fromProperties($data['message']); $this->tag = (string) $data['tag']; $this->exchange = (string) $data['exchange']; $this->queue = (string) $data['queue']; $this->routingKey = (string) $data['routingKey']; $this->redelivered = (bool) $data['routingKey']; }