Returns 'true' if status exists and belongs to "redirection" (3xx) statuses, 'false' otherwise

@param int $code

@return bool
511297
public function isRedirection(int $code): bool
    {
        return $this->statusExists($code) && ($this->extractFirstDigit($code) == self::CLASS_REDIRECTION);
    }
600634
public function status($code)
    {
        if (in_array((int) $code, array_keys(self::$header), true)) {
            $this->code = $code;

            @header('HTTP/1.1 '. $code .' '. self::$header[$code], $this->override, $code);
        }

        return $this;
    }
1039560
public function redirect(string $location, int $code = Status::FOUND): self
    {
        $this->setStatus($code)->setHeader('Location', trim($location));

        return $this;
    }
968572
public function hasStatusCode($statusCode)
    {
        try {
            $statusCode = $this->filterStatusCode($statusCode);
        } catch (InvalidArgumentException $e) {
            return false;
        }

        return isset($this->httpStatus[$statusCode]);
    }
339156
public function withStatus($code, $reasonPhrase = '')
    {
        $this->statusCode = (int)$code;
        if ($reasonPhrase == '') {
            $this->reasonPhrase = Status::getReasonPhrase($this->statusCode);
        } else {
            $this->reasonPhrase = $reasonPhrase;
        }

        return $this;
    }
155489
public function getCode($code)
    {
        $result = $this->wechat->httpPost(self::WECHAT_DELETE_CARD_URL, [
            'code' => $code
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? $result : false;
    }
268412
public function withStatusCode(int $code)
    {
        if ($this->statusCode == $code) {
            return $this;
        }

        $that = clone($this);
        $that->statusCode = $code;
        return $that;
    }
888070
public function isClientError(int $code): bool
    {
        return $this->statusExists($code) && ($this->extractFirstDigit($code) == self::CLASS_CLIENT_ERROR);
    }
932644
public function status( $code = null ) 
	{
		if ( !is_null( $code ) ) 
		{
			if ( headers_sent() && !CLI ) 
			{
				throw new CCException( "CCResponse::status - cannot change status header has already been send." );
			}

			$this->_status = $code; return $this;
		}

		return $this->_status;
	}
1243685
protected function status($status, $code)
	{
		$data = $this->getStatusData($status);
		return $this->jsonResponse($data, $code);
	}
76959
private static boolean isRedirect(int statusCode) {
        return statusCode == HttpURLConnection.HTTP_MOVED_PERM ||
                statusCode == HttpURLConnection.HTTP_MOVED_TEMP ||
                statusCode == HttpURLConnection.HTTP_SEE_OTHER;
    }
1029592
public function redirectTo( $url = 0, $code = 302 ) {
		if ( $url === null ) {
			$this->redirectTo = null;
			return true;
		}
		if ( !is_string( $url ) || !is_int( $code ) ) {
			return false;
		}
		$this->redirectTo = [ $url, $code ];
		return true;
	}
1087071
protected function redirect($source, array $parameters = array(), $code = 307)
    {
        if ($source instanceof Url) {
            $url = $source->toString();
        } elseif (filter_var($source, FILTER_VALIDATE_URL)) {
            $url = $source;
        } else {
            $url = $this->reverseRouter->getUrl($source, $parameters);
        }

        if ($code == 301) {
            throw new StatusCode\MovedPermanentlyException($url);
        } elseif ($code == 302) {
            throw new StatusCode\FoundException($url);
        } elseif ($code == 307) {
            throw new StatusCode\TemporaryRedirectException($url);
        } else {
            throw new RuntimeException('Invalid redirect status code');
        }
    }
328308
public function setHttpStatusCode($code)
    {
        $code = intval($code);
        if (!is_int($code)
            || $code < 100
            || $code > 599
        ) {
            trigger_error('Invalid HTTP status code, not taken into account.', E_USER_WARNING);
            return false;
        }
        $this->httpStatusCode = $code;
        return true;
    }
1203361
public function statusCode($code = null, $reasonPhrase = null)
    {
        if (func_num_args() < 1 || empty($code)) {
            return $this->response->getStatusCode();
        }
        $this->response = $this->response->withStatus($code, $reasonPhrase);
        return $this;
    }
768885
public function statusCodeEquals($code)
    {
        $actual = $this->session->getStatusCode();
        $message = sprintf('Current response status code is %d, but %d expected.', $actual, $code);

        $this->assert(intval($code) === intval($actual), $message);
    }
1278734
public function isCode(int $code) : bool
    {
        return sizeof($this->codes) == 1 && $this->codes[0] == $code;
    }