initialize

This commit is contained in:
2026-06-05 15:06:46 -04:00
parent dfa5e83d4d
commit 1553d20447
3 changed files with 45 additions and 1 deletions
+7 -1
View File
@@ -3,7 +3,13 @@
"description": "Potter Framework Stream Component",
"type": "library",
"require": {
"php": "^8.5"
"php": "^8.5",
"psr/http-message": "^2.0",
"potter/closeable": "^0.0.1",
"potter/detachable": "^0.0.1",
"potter/rewindable": "^0.0.1",
"potter/stringable": "^0.0.1",
"potter/writeable": "^0.0.1"
},
"license": "MIT",
"autoload": {
+11
View File
@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace Potter\Stream;
interface SeekableInterface
{
public function isSeekable(): bool;
public function seek(int $offset, int $whence = SEEK_SET): void;
}
+27
View File
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace Potter\Stream;
use \Potter\Stringable\StringableInterface;
use \Potter\Rewindable\RewindableInterface;
use \Potter\Closeable\CloseableInterface;
use \Potter\Detachable\DetachableInterface;
use \Potter\Readable\ReadableInterface;
use \Potter\Writeable\WriteableInterface;
use \Psr\Http\Message\StreamInterface as PsrStreamInterface;
interface StreamInterface extends PsrStreamInterface, StringableInterface,
ReadableInterface, WriteableInterface,
CloseableInterface, DetachableInterface,
RewindableInterface, SeekableInterface
{
public function getSize(): ?int;
public function tell(): int;
public function eof(): bool;
public function getMetadata(?string $key = null);
}