1 | <?php |
||
5 | abstract class AbstractStreamFactory implements StreamFactoryInterface |
||
6 | { |
||
7 | /** |
||
8 | * {@inheritdoc} |
||
9 | */ |
||
10 | 26 | public function create($resource = null) |
|
32 | |||
33 | /** |
||
34 | * @param resource $resource |
||
35 | * |
||
36 | * @return \Yuloh\Stream\Stream |
||
37 | */ |
||
38 | abstract protected function forResource($resource); |
||
39 | |||
40 | /** |
||
41 | * @param object $object |
||
42 | * |
||
43 | * @return \Yuloh\Stream\Stream |
||
44 | */ |
||
45 | 6 | protected function forObject($object) |
|
57 | |||
58 | /** |
||
59 | * @param string $string |
||
60 | * |
||
61 | * @return \Yuloh\Stream\Stream |
||
62 | */ |
||
63 | 12 | protected function forString($string) |
|
72 | |||
73 | /** |
||
74 | * @return \Yuloh\Stream\Stream |
||
75 | */ |
||
76 | 2 | protected function forNull() |
|
80 | } |
||
81 |