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

withAddedHeader() public method

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

Usage Example

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