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 = []) |
||
66 | |||
67 | public function failOnNextCopy(): void |
||
71 | |||
72 | public function throwExceptionWhenExecutingCommand(string $commandName, S3Exception $exception = null): void |
||
76 | |||
77 | public function throw500ExceptionWhenExecutingCommand(string $commandName): void |
||
84 | |||
85 | public function stageResultForCommand(string $commandName, ResultInterface $result): void |
||
89 | |||
90 | public function execute(CommandInterface $command) |
||
94 | |||
95 | public function getCommand($name, array $args = []) |
||
99 | |||
100 | public function getHandlerList() |
||
104 | |||
105 | public function getIterator($name, array $args = []) |
||
109 | |||
110 | public function __call($name, array $arguments) |
||
114 | |||
115 | public function executeAsync(CommandInterface $command) |
||
134 | |||
135 | public function getCredentials() |
||
139 | |||
140 | public function getRegion() |
||
144 | |||
145 | public function getEndpoint() |
||
149 | |||
150 | public function getApi() |
||
154 | |||
155 | public function getConfig($option = null) |
||
159 | |||
160 | public function getPaginator($name, array $args = []) |
||
164 | |||
165 | public function waitUntil($name, array $args = []) |
||
169 | |||
170 | public function getWaiter($name, array $args = []) |
||
174 | |||
175 | public function createPresignedRequest(CommandInterface $command, $expires, array $options = []) |
||
179 | |||
180 | public function getObjectUrl($bucket, $key) |
||
184 | } |
||
185 |