Parses and stores the response lines in `'code' => 'message'` format.

@param array $responseLines Response lines to parse.
@return void
430625
protected function _bufferResponseLines(array $responseLines)
    {
        $response = [];
        foreach ($responseLines as $responseLine) {
            if (preg_match('/^(\d{3})(?:[ -]+(.*))?$/', $responseLine, $match)) {
                $response[] = [
                    'code' => $match[1],
                    'message' => isset($match[2]) ? $match[2] : null
                ];
            }
        }
        $this->_lastResponse = array_merge($this->_lastResponse, $response);
    }
352280
private function parseLine($line)
    {
        if (($pair = $this->generateRulePair($line, array_keys(self::TOP_LEVEL_DIRECTIVES))) !== false) {
            return $this->handler->{self::TOP_LEVEL_DIRECTIVES[$pair[0]]}->add($pair[1]);
        }
1226177
private function parseResponseHeaderLine($line) {
        list($key, $value) = explode(':', $line, 2);
        $key = trim(strtolower(str_replace('-', '_', $key)));
        $value = trim($value);
        if (empty($this->headers[$key])) {
            $this->headers[$key] = $value;
        } elseif (is_array($this->headers[$key])) {
            $this->headers[$key][] = $value;
        } else {
            $this->headers[$key] = array($this->headers[$key], $value);
        }
    }
456131
private function parseSubjectByLine()
    {
        $i = 0;
        $j = 0;
        $lines = explode("\n", $this->subject);
        foreach ($lines as $currentLine) {
            $this->iteratorCache->append(new TextIteratorElement($currentLine, $i, Unicode\Functions::strlen($currentLine), false));
            $i += Unicode\Functions::strlen($currentLine);

            if (count($lines) - 1 > $j) {
                $this->iteratorCache->append(new TextIteratorElement("\n", $i, 1, true));
                $i++;
            }
            $j++;
        }
    }
574998
private function parseSuccess($responseInJson)
    {
        if (array_key_exists(self::MESSAGE_ID, $responseInJson)) {
            $this->messageId = $responseInJson[ self::MESSAGE_ID ];
        }
    }
1257188
private function parseLines(array $lines)
    {
        $originUnchanged = $this->originStartLine;
        $destUnchanged = $this->destStartLine;

        $deleted = $this->originStartLine;
        $new = $this->destStartLine;
        foreach ($lines as $line) {
            if (preg_match('/^\+(.*)/', $line)) {
                $this->lines[] = new DiffChunkLineAdded($new++, preg_replace('/\+(.*)/', ' $1', $line));
                $destUnchanged++;
            } else if (preg_match('/^-(.*)/', $line)) {
                $this->lines[] = new DiffChunkLineDeleted($deleted++, preg_replace('/-(.*)/', ' $1', $line));
                $originUnchanged++;
            } else if (preg_match('/^ (.*)/', $line) || $line == '') {
                $this->lines[] = new DiffChunkLineUnchanged($originUnchanged++, $destUnchanged++, $line);
                $deleted++;
                $new++;
            } else if (!preg_match('/\\ No newline at end of file/', $line)) {
                throw new \Exception(sprintf('GitElephant was unable to parse the line %s', $line));
            }
        }
    }
1239355
public function parseLine($line) {

        $data = explode(";", $line);
        $i    = -1;

        $model = new User();
        $model->setUserNumber(IntegerHelper::parseString($data[++$i]));
        $model->setCustomerNumber(IntegerHelper::parseString($data[++$i]));
        $model->setTitle($this->decodeString($data[++$i]));
        $model->setSurname($this->decodeString($data[++$i]));
        $model->setFirstname($this->decodeString($data[++$i]));
        $model->setDateBirth($this->decodeDate($data[++$i]));
        $model->setParkingSpace($this->decodeString($data[++$i]));
        $model->setRemarks($this->decodeString($data[++$i]));
        $model->setDatetimeLastModification($this->decodeDateTime($data[++$i]));
        $model->setDeletedRecord(BooleanHelper::parseString($data[++$i]));
        $model->setIdentificationNumber($this->decodeString($data[++$i]));
        $model->setCheckLicensePlate(BooleanHelper::parseString($data[++$i]));
        $model->setPassageLicensePlatePermitted(BooleanHelper::parseString($data[++$i]));
        $model->setExcessTimesCreditCard(BooleanHelper::parseString($data[++$i]));
        $model->setCreditCardNumber($this->decodeString($data[++$i]));
        $model->setExpiryDate($this->decodeDate($data[++$i]));
        $model->setRemarks2($this->decodeString($data[++$i]));
        $model->setRemarks3($this->decodeString($data[++$i]));
        $model->setDivision($this->decodeString($data[++$i]));
        $model->setEmail($this->decodeString($data[++$i]));
        $model->setGroupCounting(BooleanHelper::parseString($data[++$i]));
        $model->setETicketTypeP(IntegerHelper::parseString($data[++$i]));
        $model->setETicketEmailTelephone($this->decodeString($data[++$i]));
        $model->setETicketAuthentication(IntegerHelper::parseString($data[++$i]));
        $model->setETicketServiceTyp(IntegerHelper::parseString($data[++$i]));
        $model->setETicketServiceArt(IntegerHelper::parseString($data[++$i]));

        return $model;
    }
875995
public function parseResponse($responseLine, $responseData) {
        if ($responseLine == Pheanstalk_Response::RESPONSE_NOT_FOUND) {
            throw new Pheanstalk_Exception_ServerException(sprintf(
                    '%s: Job %d does not exist or is not in a kickable state.', $responseLine, $this->_job->getId()
            ));
        } elseif ($responseLine == Pheanstalk_Response::RESPONSE_KICKED) {
            return $this->_createResponse(Pheanstalk_Response::RESPONSE_KICKED);
        } else {
            throw new Exception('Unhandled response: ' . $responseLine);
        }
        return $this->_createResponse($responseLine);
    }
805486
protected function parseHeaders(array $headers)
	{
		$this->headers = array();

		// find and set the HTTP status code and reason
		$firstHeader = array_shift($headers);
		if (!preg_match('/^HTTP\/\d(\.\d)? [0-9]{3}/', $firstHeader)) {
			throw new \InvalidArgumentException('Invalid response header');
		}
		list(, $status) = explode(' ', $firstHeader, 2);
		$code = explode(' ', $status);
		$code = (int) $code[0];

		// special handling for HTTP 100 responses
		if ($code === 100) {
			// remove empty header lines between 100 and actual HTTP status
			foreach ($headers as $key => $header) {
				if ($header) {
					break;
				}
				unset($headers[$key]);
			}

			// start the process over with the 100 continue header stripped away
			return $this->parseHeaders($headers);
		}

		$this->statusText = $status;
		$this->statusCode = $code;

		foreach ($headers as $header) {
			// skip empty lines
			if (!$header) {
				continue;
			}

			$delimiter = strpos($header, ':');
			if (!$delimiter) {
				continue;
			}

			$key = trim(strtolower(substr($header, 0, $delimiter)));
			$val = ltrim(substr($header, $delimiter + 1));

			if (isset($this->headers[$key])) {
				if (is_array($this->headers[$key])) {
					$this->headers[$key][] = $val;
				} else {
					$this->headers[$key] = array($this->headers[$key], $val);
				}
			} else {
				$this->headers[$key] = $val;
			}
		}
	}
660569
public function parse($text) {
        $this->text = $text;
        $this->checksumValue = false; // Reset checksumValue
        $this->validate();

        parent::parse($text);

        $this->addDefaultLabel();
    }
100983
public function parseResponse($responseLine, $responseData)
	{
		if ($responseLine === Pheanstalk_Response::RESPONSE_DEADLINE_SOON ||
			$responseLine === Pheanstalk_Response::RESPONSE_TIMED_OUT)
		{
			return $this->_createResponse($responseLine);
		}

		list($code, $id) = explode(' ', $responseLine);

		return $this->_createResponse($code, array(
			'id' => (int)$id,
			'jobdata' => $responseData,
		));
	}
641863
protected function parseQueryParams() : void
    {
        $queryParams = [];
        $queryString = $this->request->getUri()->getQuery();
        parse_str($queryString, $queryParams);
        $this->queryParams = $queryParams;
    }
772289
protected function parseLine( $line )
	{
		$data	= preg_replace_callback( $this->patterns, array( $this, 'callback' ), $line );
		return unserialize( $data );
	}
1152684
public function parseResponse($responseLine, $responseData)
	{
		if ($responseLine == Pheanstalk_Response::RESPONSE_NOT_FOUND)
		{
			if (isset($this->_jobId))
			{
				$message = sprintf(
					'%s: Job %d does not exist.',
					$responseLine,
					$this->_jobId
				);
			}
			else
			{
				$message = sprintf(
					"%s: There are no jobs in the '%s' status",
					$responseLine,
					$this->_subcommand
				);
			}

			throw new Pheanstalk_Exception_ServerException($message);
		}
		elseif (preg_match('#^FOUND (\d+) \d+$#', $responseLine, $matches))
		{
			return $this->_createResponse(
				Pheanstalk_Response::RESPONSE_FOUND,
				array(
					'id' => (int)$matches[1],
					'jobdata' => $responseData,
				)
			);
		}
	}
210977
private function parseOutputLines(array $outputLines)
    {
        foreach ($outputLines as $line) {
            $this->parseLine($line);
        }
        usort($this->children, [$this, 'sortChildren']);
        $this->scanPathsForBlob($outputLines);
    }
69491
public function parseLine($line) {

        $data = explode(";", $line);
        $i    = -1;

        $model = new Customer();
        $model->setCustomerNumber(IntegerHelper::parseString($data[++$i]));
        $model->setTitle($this->decodeString($data[++$i]));
        $model->setSurname($this->decodeString($data[++$i]));
        $model->setFirstname($this->decodeString($data[++$i]));
        $model->setStreet($this->decodeString($data[++$i]));
        $model->setPCode($this->decodeString($data[++$i]));
        $model->setCity($this->decodeString($data[++$i]));
        $model->setCountry($this->decodeString($data[++$i]));
        $model->setTaxCode($this->decodeString($data[++$i]));
        $model->setIdDocumentNo($this->decodeString($data[++$i]));
        $model->setTelephone($this->decodeString($data[++$i]));
        $model->setRentalAgreementNo($this->decodeString($data[++$i]));
        $model->setBeginDate($this->decodeDate($data[++$i]));
        $model->setTerminationDate($this->decodeDate($data[++$i]));
        $model->setDeposit(IntegerHelper::parseString($data[++$i]));
        $model->setMaximumLevel(IntegerHelper::parseString($data[++$i]));
        $model->setRemarks($this->decodeString($data[++$i]));
        $model->setDatetimeLastModification($this->decodeDateTime($data[++$i]));
        $model->setBlocked(BooleanHelper::parseString($data[++$i]));
        $model->setBlockedDate($this->decodeDate($data[++$i]));
        $model->setDeletedRecord(BooleanHelper::parseString($data[++$i]));
        $model->setTicketReturnAllowed(BooleanHelper::parseString($data[++$i]));
        $model->setGroupCounting(BooleanHelper::parseString($data[++$i]));
        $model->setEntryMaxLevelAllowed(BooleanHelper::parseString($data[++$i]));
        $model->setMaxLevelCarPark(BooleanHelper::parseString($data[++$i]));
        $model->setRemarks2($this->decodeString($data[++$i]));
        $model->setRemarks3($this->decodeString($data[++$i]));
        $model->setDivision($this->decodeString($data[++$i]));
        $model->setEmail($this->decodeString($data[++$i]));
        $model->setCountingNeutralCards(BooleanHelper::parseString($data[++$i]));
        $model->setNationality($this->decodeString($data[++$i]));
        $model->setAccountingNumber($this->decodeString($data[++$i]));

        return $model;
    }
951300
public function setStatus($code = 200, $text = '')
    {
        if (empty($code) or !is_numeric($code)) {
            throw new ResponseException('Status codes must be numeric.');
        }

        if (empty($text)) {
            if (!is_int($code)) {
                $code = (int) $code;
            }

            if (isset($this->httpCode[$code])) {
                $text = $this->httpCode[$code];
            } else {
                throw new ResponseException('No status text available. Please check your status code number or supply your own message text.');
            }
        }

        if (strpos(PHP_SAPI, 'cgi') === 0) {
            header('Status: ' . $code . ' ' . $text, true);
        } else {
            $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';
            header($protocol . ' ' . $code . ' ' . $text, true, $code);
        }
    }