Total Complexity | 8 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class DynamoDbManager |
||
13 | { |
||
14 | /** |
||
15 | * @var DynamoDbClientInterface |
||
16 | */ |
||
17 | private $service; |
||
18 | |||
19 | /** |
||
20 | * @var \Aws\DynamoDb\Marshaler |
||
21 | */ |
||
22 | public $marshaler; |
||
23 | |||
24 | 143 | public function __construct(DynamoDbClientInterface $service) |
|
25 | { |
||
26 | 143 | $this->service = $service; |
|
27 | 143 | $this->marshaler = $service->getMarshaler(); |
|
28 | 143 | } |
|
29 | |||
30 | 59 | public function marshalItem($item) |
|
31 | { |
||
32 | 59 | return $this->marshaler->marshalItem($item); |
|
33 | } |
||
34 | |||
35 | 71 | public function marshalValue($value) |
|
36 | { |
||
37 | 71 | return $this->marshaler->marshalValue($value); |
|
38 | } |
||
39 | |||
40 | 114 | public function unmarshalItem($item) |
|
41 | { |
||
42 | 114 | return $this->marshaler->unmarshalItem($item); |
|
43 | } |
||
44 | |||
45 | 1 | public function unmarshalValue($value) |
|
46 | { |
||
47 | 1 | return $this->marshaler->unmarshalValue($value); |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param string|null $connection |
||
52 | * @return \Aws\DynamoDb\DynamoDbClient |
||
53 | */ |
||
54 | 2 | public function client($connection = null) |
|
55 | { |
||
56 | 2 | return $this->service->getClient($connection); |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * @return QueryBuilder |
||
61 | */ |
||
62 | 137 | public function newQuery() |
|
63 | { |
||
64 | 137 | return new QueryBuilder($this->service); |
|
65 | } |
||
66 | |||
67 | /** |
||
68 | * @param string $table |
||
69 | * @return QueryBuilder |
||
70 | */ |
||
71 | 131 | public function table($table) |
|
74 | } |
||
75 | } |
||
76 |