/** * Reads a server response * * @return Response * * @since 2.0 */ public function read() { while ($this->connection->isEof() === false) { $response = new Response($this->connection->read(512, $this->config['newline'])); $this->responses[] = $response; if (substr($response->getResponse(), 3, 1) === chr(0x20)) { $this->lastResponse = $response; return $response; } } }