diff --git a/composer.json b/composer.json index b37a3fb..5f6f539 100644 --- a/composer.json +++ b/composer.json @@ -4,6 +4,7 @@ "type": "library", "require": { "php": "^8.5", + "psr/http-factory": "^1.1", "psr/http-message": "^2.0", "potter/closeable": "^0.0.1", "potter/detachable": "^0.0.1", diff --git a/src/Potter/Stream/StreamFactoryInterface.php b/src/Potter/Stream/StreamFactoryInterface.php index 56bce07..d0f4480 100644 --- a/src/Potter/Stream/StreamFactoryInterface.php +++ b/src/Potter/Stream/StreamFactoryInterface.php @@ -5,6 +5,11 @@ declare(strict_types=1); namespace Potter\Stream; use \Psr\Http\Message\StreamFactoryInterface as BaseStreamFactoryInterface; +use \Psr\Http\Message\StreamInterface as BaseStreamInterface; interface StreamFactoryInterface extends BaseStreamFactoryInterface -{ } +{ + public function createStream(string $content = ''): BaseStreamInterface; + public function createStreamFromFile(string $filename, string $mode = 'r'): BaseStreamInterface; + public function createStreamFromResource($resource): BaseStreamInterface; +}