Total Complexity | 6 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | class ListCommand extends ExecutableCommand implements PlainCommand, HasBucket, Asynchronous |
||
22 | { |
||
23 | use Async; |
||
24 | use Options; |
||
25 | |||
26 | /** @var array */ |
||
27 | protected $args = []; |
||
28 | |||
29 | /** |
||
30 | * @return string |
||
31 | */ |
||
32 | public function getBucket(): string |
||
33 | { |
||
34 | return $this->args['Bucket'] ?? ''; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param string $name |
||
39 | * |
||
40 | * @return $this |
||
41 | */ |
||
42 | public function inBucket(string $name) |
||
43 | { |
||
44 | $this->args['Bucket'] = $name; |
||
45 | |||
46 | return $this; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getPrefix(): string |
||
53 | { |
||
54 | return $this->args['Prefix'] ?? ''; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @param string $prefix |
||
59 | * |
||
60 | * @return $this |
||
61 | */ |
||
62 | public function byPrefix(string $prefix) |
||
63 | { |
||
64 | $this->args['Prefix'] = $prefix; |
||
65 | |||
66 | return $this; |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * @internal used by the handlers |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getName(): string |
||
75 | { |
||
76 | return 'ListObjects'; |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * @internal used by the handlers |
||
81 | * |
||
82 | * @return array |
||
83 | */ |
||
84 | public function toArgs(): array |
||
87 | } |
||
88 | } |
||
89 |