@param string                  $serialized
@param MessageFactoryInterface $messageFactory

@return ResponseInterface
480901
private function unserializeResponse($serialized, MessageFactoryInterface $messageFactory)
    {
        return $this->createResponse($this->unserialize($serialized), $messageFactory);
    }
482946
public function unserialize($serialized)
    {
        $results = (array)(unserialize($serialized) ?: []);
        $this->_results = SplFixedArray::fromArray($results);
        $this->_useBuffering = true;
        $this->_count = $this->_results->count();
    }
878713
public static function unserialize($serialized)
    {
        if (!is_string($serialized)) {
            throw UnserializationFailedException::forValue($serialized);
        }

        $errorMessage = null;
        $errorCode = 0;

        set_error_handler(function ($errno, $errstr) use (&$errorMessage, &$errorCode) {
            $errorMessage = $errstr;
            $errorCode = $errno;
        });

        $value = unserialize($serialized);

        restore_error_handler();

        if (null !== $errorMessage) {
            if (false !== $pos = strpos($errorMessage, '): ')) {
                // cut "unserialize(%path%):" to make message more readable
                $errorMessage = substr($errorMessage, $pos + 3);
            }

            throw UnserializationFailedException::forValue($serialized, $errorMessage, $errorCode);
        }

        return $value;
    }
1298840
public function onServiceMessage(MessageInterface $msg)
    {
        $this->serviceStreamReady = true;

        $this->getLogger()->debug('Received Service Message of Type: '.get_class($msg));

        if ($msg instanceof ActionListResponse) {
            $actions = $msg->getActions();
            $this->getLogger()->debug('The action list is: '.implode(', ', $actions).'.');
            $this->worker->setActions($actions);

            $reply = new Register();
            $reply->setActions($actions);
            $this->sendToWorkerHandler($reply);
            unset($reply);

            return;
        }

        if ($msg instanceof ExecuteJobResponse) {
            $requestId = $msg->getRequestId();
            $result    = $msg->getResult();
            $this->getLogger()->debug('Result for: '.$requestId.': '.$result);
            $this->worker->setResult($requestId, $result);

            return;
        }

        $this->getLogger()->error('Unknown service response: '.get_class($msg).'.');
    }
1007087
public function reply(Worker $worker, MessageInterface $msg)
    {
        if (!$worker->isReady()) {
            $this->getLogger()->debug(
                'Worker '.$worker->getHexId().' is not ready to receive data.');

            return;
        }
        $worker->setReady(false);

        if (!$worker->isValid()) {
            $this->getLogger()->debug(
                'Worker '.$worker->getHexId().' is not valid, destroying.');
            $msg = new Destroy();
        }

        $this->getStream('worker')->send($msg, $worker->getId());
    }
133691
public function unserialize($serialized) {
        $data = msgpack_unpack($serialized);
        $this->check        = $data['check'];
        $this->base         = $data['base'];
        $this->index        = $data['index'];
        $this->fail_states  = $data['fail_states'];
        $this->index_count  = $data['index_count'];
        $this->index_code   = $data['index_code'];
        $this->tmp_tree     = $data['tmp_tree'];
        $this->word_states  = $data['word_states'] ?? $data['words_states'];
        $this->begin_used   = $data['begin_used'];
    }
13834
public function addDefaultDeserializers(SerializerInterface $jmsSerializer): EntryPoint
    {
        $this->addDeserializer(new ArticleHandler($jmsSerializer));
        $this->addDeserializer(new OrderHandler($jmsSerializer));
        $this->addDeserializer(new CategoryHandler($jmsSerializer));
        $this->addDeserializer(new MediaHandler($jmsSerializer));
        $this->addDeserializer(new ManufacturerHandler($jmsSerializer));

        return $this;
    }
181883
public function unserialize($serialized)
    {
        $unserialized = unserialize($serialized);
        $this->__construct($unserialized['tokens']);
        $this->seek($unserialized['index']);
    }
1068419
public function unserialize($serialized)
    {
        $args = [$serialized];
        $methodName = __FUNCTION__;

        return $this->findAndCall($methodName, $args);
    }
851028
public function unserialize($serialized)
	{
		$this->tokens = [];

		$tokenFactory = $this->getTokenFactory();
		$it = new SerializedTokenIterator(json_decode($serialized, true));

		$this->preUnserialize($it);

		while($it->valid())
		{
			$this->tokens[] = $tokenFactory->createToken($it);
		}

		$this->postUnserialize($it);
	}
849648
public function emit(Message $message, $messageCode)
    {
        $payload = $this->encodeMessage($message, $messageCode);
        $stream  = $this->connection->createStream();

        return $this->connection->send($payload, $stream);
    }
613807
public function unserialize(SerializedCommandData $serializedCommandData)
    {
        $commandClass = $serializedCommandData->getCommandClass();
        if (!is_object($serializedCommandData->getSerializedCommand()) || !$serializedCommandData->getSerializedCommand() instanceof $commandClass) {
            throw new UnserializeErrorException($serializedCommandData, "Null serializer accepts only commands as serialized command data.");
        }
        return $serializedCommandData->getSerializedCommand();
    }
493640
public function unserialize($serialized = null)
    {
        if ($this->response) {
            return Strings::unserialize((string) $this->response->getBody());
        }

        return null;
    }
652181
public function unserialize($serialized)
    {
        $data = unserialize($serialized, ['']);
        $this->body = $data['body'];
        $this->status = $data['status'];
        $this->headers = $data['headers'];
    }
761136
public AbstractQueue<ID, DATA> setMessageFactory(
            IQueueMessageFactory<ID, DATA> messageFactory) {
        this.messageFactory = messageFactory;
        return this;
    }
60915
public function save(Message $message) : ?Message
    {
        $aggregate = $message->getHeaders()->get(AggregateMessage::AGGREGATE_OBJECT);

        $this->aggregateRepository->save($message->getHeaders()->get(AggregateMessage::CALLING_MESSAGE), $aggregate);

        if ($message->getHeaders()->get(AggregateMessage::IS_FACTORY_METHOD)) {
            $aggregate = $message->getHeaders()->get(AggregateMessage::AGGREGATE_OBJECT);
            $aggregateIds = [];

            foreach ($message->getHeaders()->get(AggregateMessage::AGGREGATE_ID) as $aggregateIdName => $aggregateIdValue) {
                $aggregateIds[$aggregateIdName] = $this->propertyReaderAccessor->getPropertyValue(PropertyPath::createWith($aggregateIdName), $aggregate);
            }

            $payload = count($aggregateIds) === 1 ? array_shift($aggregateIds) : $aggregateIds;

            return
                MessageBuilder::fromMessage($message)
                    ->setPayload($payload)
                    ->build();
        }

        return $message;
    }
311537
public function unserialize($serialized)
    {
        list($this->messages, $this->isValid) = json_decode($serialized, true);
    }