src/Nette/NetteResponseTrait.php
public function sendHeaders(): void
	{
		if ($this->httpResponse === null) {
			throw new InvalidStateException(sprintf('Cannot send response without %s', Response::class));
		}

		// Send status code
		$this->httpResponse->setCode($this->getStatusCode());

		// Send headers
		foreach ($this->getHeaders() as $name => $values) {
			foreach ($values as $value) {
				$this->httpResponse->setHeader($name, $value);
			}
		}
	}
public function sendHeaders(): void
	{
		if ($this->httpResponse === null) {
			throw new InvalidStateException(sprintf('Cannot send response without %s', Response::class));
		}

		// Send status code
		$this->httpResponse->setCode($this->getStatusCode());

		// Send headers
		foreach ($this->getHeaders() as $name => $values) {
			foreach ($values as $value) {
				$this->httpResponse->setHeader($name, $value);
			}
		}
	}
public function sendHeaders ( ) : void { if ( $ this -> httpResponse === null ) { throw new InvalidStateException ( sprintf ( 'Cannot send response without %s' , Response :: class ) ) ; } // Send status code $ this -> httpResponse -> setCode ( $ this -> getStatusCode ( ) ) ; // Send headers foreach ( $ this -> getHeaders ( ) as $ name => $ values ) { foreach ( $ values as $ value ) { $ this -> httpResponse -> setHeader ( $ name , $ value ) ; } } }
Send all headers and status code
Send all headers and status code