Compare commits

...

2 Commits

Author SHA1 Message Date
jay 1553d20447 initialize 2026-06-05 15:06:46 -04:00
jay dfa5e83d4d refractor to potter/stream 2026-05-31 17:45:09 -04:00
4 changed files with 50 additions and 6 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
# Template
# Stream
Potter Framework Component Template
Potter Framework Stream Component
+10 -4
View File
@@ -1,14 +1,20 @@
{
"name": "potter/template",
"description": "Potter Framework Component Template",
"name": "potter/stream",
"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": {
"psr-4": {
"Potter\\": "src/Potter/"
"Potter\\Stream\\": "src/Potter/Stream/"
}
},
"authors": [
+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);
}