src/Adapter/AmazonS3.php 1 location
|
@@ 315-324 (lines=10) @@
|
| 312 |
|
/** |
| 313 |
|
* {@inheritDoc} |
| 314 |
|
*/ |
| 315 |
|
public function copyToLocalTemporaryFile($path) |
| 316 |
|
{ |
| 317 |
|
$content = $this->read($path); |
| 318 |
|
$extension = pathinfo($path, PATHINFO_EXTENSION); |
| 319 |
|
$target = tempnam($this->localTmpDir, null) . '.' . $extension; |
| 320 |
|
|
| 321 |
|
file_put_contents($target, $content); |
| 322 |
|
|
| 323 |
|
return $target; |
| 324 |
|
} |
| 325 |
|
|
| 326 |
|
/** |
| 327 |
|
* Returns an s3 location in normalised format, plus parses the bucket name |
src/Adapter/LocalStorage.php 1 location
|
@@ 222-231 (lines=10) @@
|
| 219 |
|
/** |
| 220 |
|
* {@inheritDoc} |
| 221 |
|
*/ |
| 222 |
|
public function copyToLocalTemporaryFile($path) |
| 223 |
|
{ |
| 224 |
|
$content = $this->read($path); |
| 225 |
|
$extension = pathinfo($path, PATHINFO_EXTENSION); |
| 226 |
|
$target = tempnam($this->localTmpDir, null) . '.' . $extension; |
| 227 |
|
|
| 228 |
|
file_put_contents($target, $content); |
| 229 |
|
|
| 230 |
|
return $target; |
| 231 |
|
} |
| 232 |
|
|
| 233 |
|
/** |
| 234 |
|
* @param string $input |