1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Demv\JSend\Test; |
4
|
|
|
|
5
|
|
|
use Psr\Http\Message\StreamInterface; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Class DummyStream |
9
|
|
|
* @package Demv\JSend\Test |
10
|
|
|
*/ |
11
|
|
|
final class DummyStream implements StreamInterface |
12
|
|
|
{ |
13
|
|
|
private $content; |
14
|
|
|
|
15
|
|
|
public function __construct(string $content) |
16
|
|
|
{ |
17
|
|
|
$this->content = $content; |
18
|
|
|
} |
19
|
|
|
|
20
|
|
|
public function __toString() |
21
|
|
|
{ |
22
|
|
|
return $this->getContents(); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
public function close(): void |
26
|
|
|
{ |
27
|
|
|
// TODO: Implement close() method. |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
public function detach(): void |
31
|
|
|
{ |
32
|
|
|
// TODO: Implement detach() method. |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
public function getSize(): void |
36
|
|
|
{ |
37
|
|
|
// TODO: Implement getSize() method. |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function tell(): void |
41
|
|
|
{ |
42
|
|
|
// TODO: Implement tell() method. |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
public function eof(): void |
46
|
|
|
{ |
47
|
|
|
// TODO: Implement eof() method. |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
public function isSeekable(): void |
51
|
|
|
{ |
52
|
|
|
// TODO: Implement isSeekable() method. |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function seek($offset, $whence = SEEK_SET): void |
56
|
|
|
{ |
57
|
|
|
// TODO: Implement seek() method. |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
public function rewind(): void |
61
|
|
|
{ |
62
|
|
|
// TODO: Implement rewind() method. |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
public function isWritable(): void |
66
|
|
|
{ |
67
|
|
|
// TODO: Implement isWritable() method. |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
public function write($string): void |
71
|
|
|
{ |
72
|
|
|
// TODO: Implement write() method. |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function isReadable(): void |
76
|
|
|
{ |
77
|
|
|
// TODO: Implement isReadable() method. |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
public function read($length): void |
81
|
|
|
{ |
82
|
|
|
// TODO: Implement read() method. |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
public function getContents() |
86
|
|
|
{ |
87
|
|
|
return $this->content; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
public function getMetadata($key = null): void |
91
|
|
|
{ |
92
|
|
|
// TODO: Implement getMetadata() method. |
93
|
|
|
} |
94
|
|
|
} |