Example #1
0
 /**
  * {@inheritDoc}
  */
 public function get($name)
 {
     $config = new SqsQueueConfig();
     $config->setName($this->prepareQueueName($name));
     if ($this->has($name)) {
         $attributes = $this->readQueueAttributes($config->getName());
         $config->hydrate($attributes);
         return new SqsQueue($this->client, $config);
     } else {
         if (!$this->config->getCreateNotFound()) {
             throw new QueueNotFoundException('cannot find the queue with name ' . $name);
         }
         $config->setName($name);
         return $this->create($config);
     }
 }