WordPress\AiClientDependencies\Nyholm\Psr7
ServerRequest::withoutAttribute
Method of the class: ServerRequest{}
No Hooks.
Returns
static.
Usage
$ServerRequest = new ServerRequest(); $ServerRequest->withoutAttribute( $attribute ): ServerRequestInterface;
- $attribute(required)
- .
ServerRequest::withoutAttribute() ServerRequest::withoutAttribute code WP 7.0
public function withoutAttribute($attribute): ServerRequestInterface
{
if (!\is_string($attribute)) {
throw new \InvalidArgumentException('Attribute name must be a string');
}
if (\false === \array_key_exists($attribute, $this->attributes)) {
return $this;
}
$new = clone $this;
unset($new->attributes[$attribute]);
return $new;
}