@@ 105-117 (lines=13) @@ | ||
102 | * @override |
|
103 | * @inheritDoc |
|
104 | */ |
|
105 | public function start() |
|
106 | { |
|
107 | if ($this->open || $this->ending) |
|
108 | { |
|
109 | return Promise::doResolve($this); |
|
110 | } |
|
111 | ||
112 | $this->open = true; |
|
113 | $this->ending = false; |
|
114 | $this->handleStart(); |
|
115 | ||
116 | return Promise::doResolve($this); |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * @override |
|
@@ 123-135 (lines=13) @@ | ||
120 | * @override |
|
121 | * @inheritDoc |
|
122 | */ |
|
123 | public function stop() |
|
124 | { |
|
125 | if (!$this->open && !$this->ending) |
|
126 | { |
|
127 | return Promise::doResolve($this); |
|
128 | } |
|
129 | ||
130 | $this->open = false; |
|
131 | $this->ending = false; |
|
132 | $this->handleStop(); |
|
133 | ||
134 | return Promise::doResolve($this); |
|
135 | } |
|
136 | ||
137 | /** |
|
138 | * @override |