1 | <?php |
||
22 | class S3ClientStub implements S3ClientInterface |
||
23 | { |
||
24 | use S3ClientTrait; |
||
25 | |||
26 | /** |
||
27 | * @var S3ClientInterface |
||
28 | */ |
||
29 | private $actualClient; |
||
30 | |||
31 | /** |
||
32 | * @var S3Exception[] |
||
33 | */ |
||
34 | private $stagedExceptions = []; |
||
35 | |||
36 | /** |
||
37 | * @var ResultInterface[] |
||
38 | */ |
||
39 | private $stagedResult = []; |
||
40 | |||
41 | /** |
||
42 | * @var Throwable|null |
||
43 | */ |
||
44 | private $exceptionForUpload = null; |
||
45 | |||
46 | public function __construct(S3ClientInterface $client) |
||
50 | |||
51 | public function throwDuringUpload(Throwable $throwable): void |
||
55 | |||
56 | public function upload($bucket, $key, $body, $acl = 'private', array $options = []) |
||
64 | |||
65 | public function failOnNextCopy(): void |
||
69 | |||
70 | public function throwExceptionWhenExecutingCommand(string $commandName, S3Exception $exception = null): void |
||
74 | |||
75 | public function throw500ExceptionWhenExecutingCommand(string $commandName): void |
||
82 | |||
83 | public function stageResultForCommand(string $commandName, ResultInterface $result): void |
||
87 | |||
88 | public function execute(CommandInterface $command) |
||
92 | |||
93 | public function getCommand($name, array $args = []) |
||
97 | |||
98 | public function getHandlerList() |
||
102 | |||
103 | public function getIterator($name, array $args = []) |
||
107 | |||
108 | public function __call($name, array $arguments) |
||
112 | |||
113 | public function executeAsync(CommandInterface $command) |
||
132 | |||
133 | public function getCredentials() |
||
137 | |||
138 | public function getRegion() |
||
142 | |||
143 | public function getEndpoint() |
||
147 | |||
148 | public function getApi() |
||
152 | |||
153 | public function getConfig($option = null) |
||
157 | |||
158 | public function getPaginator($name, array $args = []) |
||
162 | |||
163 | public function waitUntil($name, array $args = []) |
||
167 | |||
168 | public function getWaiter($name, array $args = []) |
||
172 | |||
173 | public function createPresignedRequest(CommandInterface $command, $expires, array $options = []) |
||
177 | |||
178 | public function getObjectUrl($bucket, $key) |
||
182 | } |
||
183 |