本文整理汇总了PHP中Aws\DynamoDb\DynamoDbClient::getScanIterator方法的典型用法代码示例。如果您正苦于以下问题:PHP DynamoDbClient::getScanIterator方法的具体用法?PHP DynamoDbClient::getScanIterator怎么用?PHP DynamoDbClient::getScanIterator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aws\DynamoDb\DynamoDbClient
的用法示例。
在下文中一共展示了DynamoDbClient::getScanIterator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: find
/**
* {@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();
}
示例2: find
/**
* {@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();
}
示例3: getScanIterator
/**
* Executes the GetScanIterator operation.
*
* @param string $tableName The name of the table containing the requested items.
* @param array $args Arguments of the query
*
* @return Guzzle\Service\Resource\ResourceIteratorInterface
*
* @see http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.DynamoDb.DynamoDbClient.html#_getScanIterator
*/
public function getScanIterator($tableName, array $args)
{
$args['TableName'] = $tableName;
return $this->client->getScanIterator($args);
}