/** * {@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(); }
/** * {@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(); }