Exemplo n.º 1
0
 /**
  * (non-PHPdoc)
  * @see ContentEngine\Filter\Serialise.SerialisationAlgorithmInterface::unserialise()
  */
 public function unserialise($serial)
 {
     if (isset($this->encryptor)) {
         $serial = $this->encryptor->decrypt($serial);
     }
     if (isset($this->compressor)) {
         $serial = $this->compressor->decompress($serial);
     }
     $data = $this->serialiser->unserialise($serial);
     return $data;
 }
Exemplo n.º 2
0
 /**
  * (non-PHPdoc)
  * @see ContentEngine\Request.QueueInterface::get()
  */
 public function get()
 {
     if (!isset($this->queue)) {
         throw new \Exception('No AMQP queue set.');
     }
     $envelope = $this->queue->get($this->flags);
     if (!$envelope) {
         return null;
     }
     // extract data
     $serial = $envelope->getBody();
     $item = $this->serialiser->unserialise($serial);
     $item['amqpDeliveryTag'] = $envelope->getDeliveryTag();
     $item['amqpMessageId'] = $envelop->getMessageId();
     return $item;
 }