AWS SDK PHP类 'AWS \\ \\ DynamoDb型号\\ \\ BatchR

2019-10-30 04:19发布

不与我的CI工作的唯一AWS DynamoDb类是WriteRequestBatch尽管该类已经发现,当右键点击它,你可以在截图中看到。

echo Aws\Sdk::VERSION . "\n";
# 3.20.11
echo CI_VERSION . "\n";
# 3.1.2

<?php

// ...

use Aws\DynamoDb\Model\BatchRequest\PutRequest;
use Aws\DynamoDb\Model\BatchRequest\WriteRequestBatch;

class Example_model extends CI_Model {
// ...

function Dynamo($ids)
{

    $client = Aws\DynamoDb\DynamoDbClient::factory(array(
        'profile' => 'default',
        'region'  => 'eu-central-1',
        'version' => 'latest'
    ));
    $putBatch = WriteRequestBatch::factory($client);
    // ...
}

// ...

任何建议?

文章来源: AWS SDK PHP Class 'Aws\\DynamoDb\\Model\\BatchRequest\\WriteRequestBatch' not found