@param string|UriInterface $uri
@param int                 $status

@return ResponseInterface
@throws \InvalidArgumentException
350990
public function redirect($uri, int $status = 301): ResponseInterface
    {
        if (!\is_string($uri) && !$uri instanceof UriInterface) {
            throw new \InvalidArgumentException('Uri MUST be a string or Psr\Http\Message\UriInterface instance; received "' .
                (\is_object($uri) ? \get_class($uri) : \gettype($uri)) . '"');
        }

        $this->header->set('Location', (string) $uri);

        return $this->empty($status);
    }
721833
public function setStatus(int $status) : Response
    {
        if (in_array($status, static::RESPONSE_STATUSES)) {
            $this->status = $status;

            return $this;
        }

        throw new \LogicException("Status code must be a valid status code, but {$status} is not.");
    }
1281321
public static function create(int $statusCode, ResourceInterface $resource = null): PresentationInterface
    {
        return new Presentation($statusCode, $resource);
    }
1000126
public function setStatus($status)
	{
		$status = (int)$status;

		if($status < 100)
		{
			throw new \InvalidArgumentException(sprintf('Invalid HTTP status code: %u', $status));
		}
		
		if($status >= 600)
		{
			throw new \InvalidArgumentException(sprintf('Invalid HTTP status code: %u', $status));
		}
		
		$this->status = $status;
		
		return $this;
	}
125836
protected function setResponseStatus(Response $response, $status)
    {
        if (CacheableInterface::CACHE_PUBLIC == $status) {
            $response->setPublic();
        } else {
            $response->setPrivate();
        }
    }
240948
public function toAbsoluteUri(UriInterface $uri)
    {
        $uri = $uri->withQuery($this->query);
        $uri = (string)$uri;
        $this->session->saveViewData();

        return $this->response
            ->withStatus(302)
            ->withHeader('Location', $uri);
    }
1367305
public function redirect($uri, $destination, $status = 302)
    {
        return $this->any($uri, '\Illuminate\Routing\RedirectController')
                ->defaults('destination', $destination)
                ->defaults('status', $status);
    }
533936
public function createFromUri(UriInterface $uri)
    {
        $pointer = $uri->getFragment();
        if (null === $pointer || '/' !== substr($pointer, 0, 1)) {
            return new Pointer;
        }

        return $this->create($pointer);
    }
339284
public function redirect($url, $status = StatusCode::FOUND)
    {
        return $this->withStatus($status)->withHeader('location', $url);
    }
976673
protected function redirect($uri, $status = 302, array $headers = []): ResponseInterface
    {
        return $this->responseFactory->createRedirectResponse($uri, $status, $headers);
    }
1003181
public function internalRedirect($uri)
    {
        if (is_string($uri)) {

            // make a new URI instance, then make a new request
            $uri = $this->request->getUri()->withPath($uri);
            return $this->request->withUri($uri);

        } elseif ($uri instanceof UriInterface) {

            // get a new request with the specified URI instance
            return $this->request->withUri($uri);

        } else {

            // bad $uri value
            throw new InvalidArgumentException(
                'URI should be a string or instance of Psr\Http\Message\UriInterface'
            );

        }
    }
92392
public static function setResponseStatus(int $status) : void
    {
        if (array_key_exists($status, Http::$http_status_messages)) {
            header('HTTP/1.1 ' . $status . ' ' . Http::$http_status_messages[$status]);
        }
    }
1359129
public function createRedirect(string $location, int $status = 307): ResponseInterface
    {
        return $this->responseFactory->createResponse($status)->withHeader('Location', $location);
    }
409121
public function redirect($url, $status = 301)
    {
        $status = (int) $status;

        if (!empty($url)) {

            header($this->get('protocol') . ' 301 Redirect');
            header('Status: ' . $status . ' Redirect');
            header('Location: ' . $url);
            exit(0);
        } else {
            throw new \Exception('Url is empty !');
        }
    }
761281
private function buildHost(UriInterface $uri): string
    {
        return $uri->getHost().($uri->getPort() !== null ? ':'.$uri->getPort() : '');
    }
1136458
public function load(UriInterface $uri)
    {
        if (!$uri instanceof DataUriInterface) {
            throw new InvalidUriTypeException(
                $uri,
                'Eloquent\Schemer\Uri\DataUriInterface'
            );
        }

        return new Content(
            $uri->getData(),
            $this->stripMimeTypeParameters($uri->getMimeType())
        );
    }
443294
public function setVisibility(string $poiId, int $status)
    {
        if (!in_array($status, [0, 1], true)) {
            throw new InvalidArgumentException('status should be 0 or 1.');
        }

        return $this->httpPostJson('wxa/setnearbypoishowstatus', [
            'poi_id' => $poiId,
            'status' => $status,
        ]);
    }