Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function find($storageName, $key)
 {
     $iterator = new ItemIterator($this->client->getScanIterator(['TableName' => $storageName, 'Key' => ['Id' => ['S' => $key]]]));
     $results = $iterator->toArray();
     if (count($results)) {
         return array_shift($results);
     }
     throw new NotFoundException();
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function find($storageName, $key)
 {
     $iterator = new ItemIterator($this->client->getScanIterator(array("TableName" => $storageName, "Key" => array("Id" => array('S' => $key)))));
     $results = $iterator->toArray();
     if (count($results)) {
         return array_shift($results);
     }
     throw new NotFoundException();
 }