WordPress\AiClientDependencies\Psr\Http\Message
MessageInterface::withHeader
Return an instance with the provided value replacing the specified header.
While header names are case-insensitive, the casing of the header will be preserved by this function, and returned from getHeaders().
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the new and/or updated header and value.
Метод класса: MessageInterface{}
Хуков нет.
Возвращает
static.
Использование
$MessageInterface = new MessageInterface(); $MessageInterface->withHeader( $name, $value ): MessageInterface;
- $name(строка) (обязательный)
- Case-insensitive header field name.
- $value(строка|string[]) (обязательный)
- Header value(s).
Код MessageInterface::withHeader() MessageInterface::withHeader WP 7.1.2
public function withHeader(string $name, $value): MessageInterface;