1 | <?php |
||
17 | class StreamState |
||
18 | { |
||
19 | const STATE_CREATED = 0; |
||
20 | const STATE_READY = 1; |
||
21 | const STATE_CLOSED = 2; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | public $state = self::STATE_CREATED; |
||
27 | |||
28 | public function open() |
||
36 | |||
37 | public function close() |
||
49 | |||
50 | /** |
||
51 | * Stream is ready to receive data. |
||
52 | * |
||
53 | * @return bool |
||
54 | */ |
||
55 | public function isReady() |
||
59 | |||
60 | /** |
||
61 | * Did you not forget to close the stream? |
||
62 | */ |
||
63 | public function __destruct() |
||
69 | } |
||
70 |