| Conditions | 3 |
| Paths | 6 |
| Total Lines | 24 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function execute(string $localBasePath, ConnectionAdapterInterface $connection): bool |
||
| 33 | { |
||
| 34 | $absolutePath = $localBasePath . $this->relativePath; |
||
| 35 | |||
| 36 | $localStream = fopen($absolutePath, 'rb'); |
||
| 37 | |||
| 38 | foreach ($this->streamFilterConfigMap as $filterName => $filterParams) |
||
| 39 | { |
||
| 40 | stream_filter_append($localStream, $filterName, STREAM_FILTER_READ, $filterParams); |
||
| 41 | } |
||
| 42 | |||
| 43 | try |
||
| 44 | { |
||
| 45 | $connection->writeStream($this->blobId, $localStream); |
||
| 46 | |||
| 47 | fclose($localStream); |
||
| 48 | |||
| 49 | return true; |
||
| 50 | } |
||
| 51 | catch (Exception $exception) |
||
| 52 | { |
||
| 53 | return false; |
||
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 67 |