MailMimeParser 4.0

HeaderParserService
in package

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

Tags
author

Zaahid Bateson

Table of Contents

$maxHeaderCount  : int
$maxHeaderSizeBytes  : int
__construct()  : mixed
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.

Properties

Methods

__construct()

public __construct([int $maxHeaderCount = 1000 ][, int $maxHeaderSizeBytes = 1048576 ]) : mixed
Parameters
$maxHeaderCount : int = 1000
$maxHeaderSizeBytes : int = 1048576
Return values
mixed

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