This repository was archived by the owner on May 13, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +98
-0
lines changed
Expand file tree Collapse file tree 3 files changed +98
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Http Message Factory package.
5+ *
6+ * (c) PHP HTTP Team
7+ *
8+ * For the full copyright and license information, please read the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ namespace Http \Message ;
13+
14+ use Psr \Http \Message \StreamInterface ;
15+
16+ /**
17+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
18+ */
19+ interface StreamFactory
20+ {
21+ /**
22+ * Creates a stream
23+ *
24+ * @param string|resource|StreamInterface|null $body
25+ *
26+ * @return StreamInterface
27+ *
28+ * @throws \InvalidArgumentException If the stream body is invalid
29+ */
30+ public function createStream ($ body = null );
31+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Http Message Factory package.
5+ *
6+ * (c) PHP HTTP Team
7+ *
8+ * For the full copyright and license information, please read the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ namespace Http \Message ;
13+
14+ /**
15+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
16+ */
17+ interface StreamFactoryAware
18+ {
19+ /**
20+ * @return StreamFactory
21+ */
22+ public function getStreamFactory ();
23+
24+ /**
25+ * @param StreamFactory $streamFactory
26+ */
27+ public function setStreamFactory (StreamFactory $ streamFactory );
28+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Http Message Factory package.
5+ *
6+ * (c) PHP HTTP Team
7+ *
8+ * For the full copyright and license information, please read the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ namespace Http \Message ;
13+
14+ /**
15+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
16+ */
17+ interface StreamFactoryHelper
18+ {
19+ /**
20+ * @var StreamFactory
21+ */
22+ protected $ streamFactory ;
23+
24+ /**
25+ * {@inheritdoc}
26+ */
27+ public function getStreamFactory ()
28+ {
29+ return $ this ->streamFactory ;
30+ }
31+
32+ /**
33+ * {@inheritdoc}
34+ */
35+ public function setStreamFactory (StreamFactory $ streamFactory )
36+ {
37+ $ this ->streamFactory = $ streamFactory ;
38+ }
39+ }
You can’t perform that action at this time.
0 commit comments