public function stop() { if ($this->isRunning()) { file_put_contents($this->pipefile, "-stay_open False\n", FILE_APPEND); } $this->server->stop(); }