public static function hasHeader($message, $header)
    {
        if (!empty($message['headers'])) {
            foreach ($message['headers'] as $name => $value) {
                if (!strcasecmp($name, $header)) {
                    return true;
                }
            }
        }

        return false;
    }
public static function hasHeader($message, $header)
    {
        if (!empty($message['headers'])) {
            foreach ($message['headers'] as $name => $value) {
                if (!strcasecmp($name, $header)) {
                    return true;
                }
            }
        }

        return false;
    }
public static function hasHeader ( $ message , $ header ) { if ( ! empty ( $ message [ 'headers' ] ) ) { foreach ( $ message [ 'headers' ] as $ name => $ value ) { if ( ! strcasecmp ( $ name , $ header ) ) { return true ; } } } return false ; }
Returns true if a message has the provided case-insensitive header.

@param array  $message Request or response hash.
@param string $header  Header to check

@return bool
Returns true if a message has the provided case - insensitive header .