15use Aws\DynamoDb\DynamoDbClient;
16use Aws\DynamoDb\Marshaler;
58 if (defined(
'Aws\Sdk::VERSION') && version_compare(Sdk::VERSION,
'3.0',
'>=')) {
60 $this->marshaler =
new Marshaler;
74 protected function write(array $record)
77 if ($this->version === 3) {
78 $formatted = $this->marshaler->marshalItem($filtered);
80 $formatted = $this->client->formatAttributes($filtered);
83 $this->client->putItem(array(
84 'TableName' => $this->table,
95 return array_filter($record,
function ($value) {
96 return !empty($value) ||
false === $value || 0 === $value;
An exception for terminatinating execution or to throw for unit testing.
Base Handler class providing the Handler structure.
Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/)
getDefaultFormatter()
{Gets the default formatter.FormatterInterface}
__construct(DynamoDbClient $client, $table, $level=Logger::DEBUG, $bubble=true)
filterEmptyFields(array $record)
write(array $record)
{Writes the record down to the log of the implementing handler.void}
const DEBUG
Detailed debug information.