Zend\Stratigility\Http\Response::withHeader PHP Method

withHeader() public method

public withHeader ( $header, $value )
    public function withHeader($header, $value)
    {
        if ($this->complete) {
            throw $this->responseIsAlreadyCompleted(__METHOD__);
        }
        $new = $this->psrResponse->withHeader($header, $value);
        return new self($new);
    }

Usage Example

Example #1
0
 /**
  * {@inheritDoc}
  */
 public function withHeader($header, $value)
 {
     return new self($this->app, parent::withHeader($header, $value));
 }