You are here

public function ServerRequest::withoutAttribute in Auth0 Single Sign On 8.2

Return an instance that removes the specified derived request attribute.

This method allows removing a single derived request attribute as described in getAttributes().

This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that removes the attribute.

Parameters

string $name The attribute name.:

Return value

static

Overrides ServerRequestInterface::withoutAttribute

See also

getAttributes()

File

vendor/guzzlehttp/psr7/src/ServerRequest.php, line 365

Class

ServerRequest
Server-side HTTP request

Namespace

GuzzleHttp\Psr7

Code

public function withoutAttribute($attribute) {
  if (false === array_key_exists($attribute, $this->attributes)) {
    return $this;
  }
  $new = clone $this;
  unset($new->attributes[$attribute]);
  return $new;
}