1 | <?php |
||
14 | class Stream extends GuzzleStream |
||
15 | { |
||
16 | private $contents; |
||
17 | |||
18 | private $resource; |
||
19 | |||
20 | public function __construct($stream, $options = []) |
||
26 | |||
27 | /** |
||
28 | * Returns the stream resource |
||
29 | * |
||
30 | * @return resource |
||
31 | */ |
||
32 | public function getResource() |
||
36 | |||
37 | /** |
||
38 | * Sets stream contents |
||
39 | * |
||
40 | * @param string $contents |
||
41 | */ |
||
42 | public function setContents($contents) |
||
46 | |||
47 | /** |
||
48 | * Updates the stream contents |
||
49 | */ |
||
50 | public function save() |
||
56 | |||
57 | /** |
||
58 | * If the contents is setted, return it |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getContents() |
||
70 | |||
71 | public function __toString() |
||
79 | |||
80 | /** |
||
81 | * Copies a stream to another |
||
82 | * |
||
83 | * @param self|resource $stream |
||
84 | * |
||
85 | * @return integer |
||
86 | */ |
||
87 | public function pipe($stream) |
||
97 | } |