Get Http code

@return int
518267
public function getHttpCode()
    {
        $code= 200;
        if ($this->errors) {
            /**
             * @var \FreeFW\JsonApi\V1\Model\ErrorObject $oneError
             */
            foreach ($this->errors as $idx => $oneError) {
                if ($oneError->getStatus() > $code) {
                    $code = $oneError->getStatus();
                }
            }
        }
        return $code;
    }
1041938
public static function get( $code = 200 )
	{
		if( isset( self::$http_status_codes[$code] ) )
		{
			return( self::$http_status_codes[ $code ] );
		}
		return( false );
	}
764191
public function get_response_code()
    {
        switch ($this->conn->resultcode) {
            case 'NOPERM':
                return self::NOPERM;
            case 'READ-ONLY':
                return self::READONLY;
            case 'TRYCREATE':
                return self::TRYCREATE;
            case 'INUSE':
                return self::INUSE;
            case 'OVERQUOTA':
                return self::OVERQUOTA;
            case 'ALREADYEXISTS':
                return self::ALREADYEXISTS;
            case 'NONEXISTENT':
                return self::NONEXISTENT;
            case 'CONTACTADMIN':
                return self::CONTACTADMIN;
            default:
                return self::UNKNOWN;
        }
    }
1188498
final public function get($code = null) {

        if ( is_null($code) ) return $this->rpc_errors;

        else if ( array_key_exists($code, $this->rpc_errors) ) return $this->rpc_errors[$code];

        else if ( $code >= -32099 && $code <= -32000 ) return 'Server Error';

        else return 'Unknown Error';

    }
772908
public function getCode()
    {
        return $this->hasTransaction()
            ? (string) $this->data->Payment->TxnList->Txn->responseCode
            : (string) $this->data->Status->statusCode;
    }
219659
public function getCode(): int {
        if ($status = $this->getMainCode()) {
            return $status;
        }

        if ($this->isValid()) {
            return 200;
        }

        // There was no status so loop through the errors and look for the highest one.
        $max = 0;
        foreach ($this->getRawErrors() as $error) {
            if (isset($error['code']) && $error['code'] > $max) {
                $max = $error['code'];
            }
        }

        return $max ?: 400;
    }
544926
private function getInputFromHTTP() {
		if($this->logger) $this->logger->debug('Getting and decoding HTTP request body');
		$input = file_get_contents('php://input');
		$this->setInput($input);
		return $this->input;
	}
1020548
function responseCode($code = null) {
		if ($code === null) {
			return $this->http_response_code;
		}
		else { // $code !== null, act as setter
			$this->http_response_code = $code;
			return $this;
		}
	}
633734
public function getPort() : int
    {
        if ($this->isUsingTrustedProxy()) {
            if ($this->server->has(self::$trustedHeaderNames[RequestHeaders::CLIENT_PORT])) {
                return (int)$this->server->get(self::$trustedHeaderNames[RequestHeaders::CLIENT_PORT]);
            } elseif ($this->server->get(self::$trustedHeaderNames[RequestHeaders::CLIENT_PROTO]) === 'https') {
                return 443;
            }
        }

        return (int)$this->server->get('SERVER_PORT');
    }
1038991
public static function http_response_code($newcode = NULL)
    {
        static $code = 200;
        if($newcode !== NULL)
        {
            header('X-PHP-Response-Code: '.$newcode, true, $newcode);
            if(!headers_sent())
                $code = $newcode;
        }
        return $code;
    }
321328
public function getHeaders()
    {
        $return = array();

        foreach ($this->contents as $key => $value) {
            if (strpos($key, self::$HttpPrefix) === 0) { // @codeCoverageIgnore
                $return[substr($key, strlen(self::$HttpPrefix))] = $value; // @codeCoverageIgnore
            } // @codeCoverageIgnore

            if (in_array($key, self::$HttpCustomHeaders)) {
                $return[$key] = $value;
            }
        }

        return $return;
    }
664510
private function getHttpMethod(): string
    {
        if (!empty($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
            $method = mb_strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
        } else {
            $method = mb_strtoupper($_SERVER['REQUEST_METHOD']);
        }

        switch ($method) {
            case 'GET':
                return static::HTTP_METHOD_GET;
            case 'HEAD':
                return static::HTTP_METHOD_HEAD;
            case 'POST':
                return static::HTTP_METHOD_POST;
            case 'OPTIONS':
                return static::HTTP_METHOD_OPTIONS;
            case 'CONNECT':
                return static::HTTP_METHOD_CONNECT;
            case 'TRACE':
                return static::HTTP_METHOD_TRACE;
            case 'PUT':
                return static::HTTP_METHOD_PUT;
            case 'DELETE':
                return static::HTTP_METHOD_DELETE;
            default:
                return static::HTTP_METHOD_UNKNOWN;
        }
    }
352767
public function getUrlRacine()
    {
        $protocol = empty($_SERVER["HTTPS"])?"http":"https";
        if (isset($_SERVER["SERVER_NAME"])) {
            $dirname=dirname($_SERVER["PHP_SELF"]);
            if (basename($dirname)=="script") {
                $dirname = dirname($dirname);
            }
        } else {
            $dirname="";
        }
        $url =$protocol."://".$this->getNomServeur().
        $dirname;
        if ($dirname!="/") {
            $url.="/";
        }
        return $url;
    }
285115
public function getExitCode(): int
	{
		return $this->exitCode ?: (\is_int($this->error->getCode()) && $this->error->getCode() !== 0 ? $this->error->getCode() : 1);
	}
409492
public function getCode()
    {
        return join(' ', array(
            $this->getResponseCode(),
            $this->getResponseText(),
            '(' . $this->getHttpResponseCode(),
            $this->getHttpResponseCodeText() . ')',
        ));
    }
1297496
public function getHttpVersion() {
		if (!isset($this->httpVersion)) {
			$serverProtocol = $_SERVER['SERVER_PROTOCOL'];
			$this->httpVersion = substr($serverProtocol, strpos($serverProtocol, '/') + 1);
		}
		return $this->httpVersion;
	}
585376
public function getLangClient() {
        if (!array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER) || !$_SERVER['HTTP_ACCEPT_LANGUAGE']) {
            return Config::config()['user']['output']['lang'];
        }
        else {
            $langcode = (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '';
            $langcode = (!empty($langcode)) ? explode(";", $langcode) : $langcode;
            $langcode = (!empty($langcode['0'])) ? explode(",", $langcode['0']) : $langcode;
            $langcode = (!empty($langcode['0'])) ? explode("-", $langcode['0']) : $langcode;

            return $langcode['0'];
        }
    }