Yoast\WP\SEO\AI\Authentication\Application
OAuth_Auth_Strategy::get_header_value
Returns the value of the given header, or null if missing/empty.
Keys are already lower-cased by MyYoast HTTP_Client / Response_Parser, so callers pass the lower-cased name they expect.
Метод класса: OAuth_Auth_Strategy{}
Хуков нет.
Возвращает
string|null. The header value, or null.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_header_value( $headers, $name ): ?string;
- $headers(массив) (обязательный)
- .
- $name(строка) (обязательный)
- The header name (lower-case).
Код OAuth_Auth_Strategy::get_header_value() OAuth Auth Strategy::get header value Yoast 28.9
private function get_header_value( array $headers, string $name ): ?string {
$value = ( $headers[ $name ] ?? null );
if ( \is_array( $value ) ) {
$value = \reset( $value );
}
return ( \is_string( $value ) && $value !== '' ) ? $value : null;
}