Compare commits
2 Commits
10bd491dd2
...
1553d20447
| Author | SHA1 | Date | |
|---|---|---|---|
| 1553d20447 | |||
| dfa5e83d4d |
@@ -1,3 +1,3 @@
|
||||
# Template
|
||||
# Stream
|
||||
|
||||
Potter Framework Component Template
|
||||
Potter Framework Stream Component
|
||||
+10
-4
@@ -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": [
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user