public static function headerLines($message, $header)
    {
        $result = [];

        if (!empty($message['headers'])) {
            foreach ($message['headers'] as $name => $value) {
                if (!strcasecmp($name, $header)) {
                    $result = array_merge($result, $value);
                }
            }
        }

        return $result;
    }
public static function headerLines($message, $header)
    {
        $result = [];

        if (!empty($message['headers'])) {
            foreach ($message['headers'] as $name => $value) {
                if (!strcasecmp($name, $header)) {
                    $result = array_merge($result, $value);
                }
            }
        }

        return $result;
    }
public static function headerLines ( $ message , $ header ) { $ result = [ ] ; if ( ! empty ( $ message [ 'headers' ] ) ) { foreach ( $ message [ 'headers' ] as $ name => $ value ) { if ( ! strcasecmp ( $ name , $ header ) ) { $ result = array_merge ( $ result , $ value ) ; } } } return $ result ; }
Gets an array of header line values from a message for a specific header

This method searches through the "headers" key of a message for a header
using a case-insensitive search.

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

@return array
Gets an array of header line values from a message for a specific header