WordPress\AiClientDependencies\Nyholm\Psr7
ServerRequest::withAttribute
Метод класса: ServerRequest{}
Хуков нет.
Возвращает
static.
Использование
$ServerRequest = new ServerRequest(); $ServerRequest->withAttribute( $attribute, $value ): ServerRequestInterface;
- $attribute(обязательный)
- .
- $value(обязательный)
- .
Код ServerRequest::withAttribute() ServerRequest::withAttribute WP 7.0.4
public function withAttribute($attribute, $value): ServerRequestInterface
{
if (!\is_string($attribute)) {
throw new \InvalidArgumentException('Attribute name must be a string');
}
$new = clone $this;
$new->attributes[$attribute] = $value;
return $new;
}