| @@ 45-52 (lines=8) @@ | ||
| 42 | * |
|
| 43 | * @return mixed fallback result |
|
| 44 | */ |
|
| 45 | protected function stream($path, $resource, Config $config, $fallback) |
|
| 46 | { |
|
| 47 | Util::rewindStream($resource); |
|
| 48 | $contents = stream_get_contents($resource); |
|
| 49 | $fallbackCall = array($this, $fallback); |
|
| 50 | ||
| 51 | return call_user_func($fallbackCall, $path, $contents, $config); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Write using a stream. |
|
| @@ 20-27 (lines=8) @@ | ||
| 17 | * |
|
| 18 | * @return mixed fallback result |
|
| 19 | */ |
|
| 20 | protected function stream($path, $resource, Config $config, $fallback) |
|
| 21 | { |
|
| 22 | Util::rewindStream($resource); |
|
| 23 | $contents = stream_get_contents($resource); |
|
| 24 | $fallbackCall = [$this, $fallback]; |
|
| 25 | ||
| 26 | return call_user_func($fallbackCall, $path, $contents, $config); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Write using a stream. |
|