MailMimeParser 3.0

HeaderParserService
in package

Reads headers from an input stream, adding them to a PartHeaderContainer.

Tags
author

Zaahid Bateson

Table of Contents

parse()  : static
Reads header lines up to an empty line, adding them to the passed PartHeaderContainer.
addRawHeaderToPart()  : static
Ensures the header isn't empty and contains a colon separator character, then splits it and adds it to the passed PartHeaderContainer.

Methods

parse()

Reads header lines up to an empty line, adding them to the passed PartHeaderContainer.

public parse(resource $handle, PartHeaderContainer $container) : static
Parameters
$handle : resource

The resource handle to read from.

$container : PartHeaderContainer

the container to add headers to.

Return values
static

addRawHeaderToPart()

Ensures the header isn't empty and contains a colon separator character, then splits it and adds it to the passed PartHeaderContainer.

private addRawHeaderToPart(int $offset, string $header, PartHeaderContainer $headerContainer) : static
Parameters
$offset : int

read offset for error reporting

$header : string

the header line

$headerContainer : PartHeaderContainer

the container

Return values
static

Search results