PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.1.7
ShareThis Dashboard for Google Analytics v3.1.7
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / guzzlehttp / psr7 / src / LazyOpenStream.php
googleanalytics / lib / analytics-admin / vendor / guzzlehttp / psr7 / src Last commit date
Exception 3 years ago AppendStream.php 3 years ago BufferStream.php 3 years ago CachingStream.php 3 years ago DroppingStream.php 3 years ago FnStream.php 3 years ago Header.php 3 years ago HttpFactory.php 3 years ago InflateStream.php 3 years ago LazyOpenStream.php 3 years ago LimitStream.php 3 years ago Message.php 3 years ago MessageTrait.php 3 years ago MimeType.php 3 years ago MultipartStream.php 3 years ago NoSeekStream.php 3 years ago PumpStream.php 3 years ago Query.php 3 years ago Request.php 3 years ago Response.php 3 years ago Rfc7230.php 3 years ago ServerRequest.php 3 years ago Stream.php 3 years ago StreamDecoratorTrait.php 3 years ago StreamWrapper.php 3 years ago UploadedFile.php 3 years ago Uri.php 3 years ago UriComparator.php 3 years ago UriNormalizer.php 3 years ago UriResolver.php 3 years ago Utils.php 3 years ago
LazyOpenStream.php
42 lines
1 <?php
2
3 declare(strict_types=1);
4
5 namespace GuzzleHttp\Psr7;
6
7 use Psr\Http\Message\StreamInterface;
8
9 /**
10 * Lazily reads or writes to a file that is opened only after an IO operation
11 * take place on the stream.
12 */
13 #[\AllowDynamicProperties]
14 final class LazyOpenStream implements StreamInterface
15 {
16 use StreamDecoratorTrait;
17
18 /** @var string */
19 private $filename;
20
21 /** @var string */
22 private $mode;
23
24 /**
25 * @param string $filename File to lazily open
26 * @param string $mode fopen mode to use when opening the stream
27 */
28 public function __construct(string $filename, string $mode)
29 {
30 $this->filename = $filename;
31 $this->mode = $mode;
32 }
33
34 /**
35 * Creates the underlying stream lazily when required.
36 */
37 protected function createStream(): StreamInterface
38 {
39 return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
40 }
41 }
42