MailMimeParser 0.4

UUEncodeStreamFilter extends php_user_filter

Stream filter converts binary streams to uuencoded text.

Tags
author

Zaahid Bateson

Table of Contents

STREAM_FILTER_NAME  = 'mailmimeparser-uuencode'
Name used when registering with stream_filter_register.
$headerWritten  : bool
$leftovers  : StreamLeftover
filter()  : int
Filter implementation converts encoding before returning PSFS_PASS_ON.
onCreate()  : mixed
Sets up the leftovers object
convertAndAppend()  : mixed
UUEncodes the passed $data string and appends it to $out.
getUUEncodingFooter()  : string
Returns the footer for a uuencoded part.
readAndConvert()  : mixed
Reads from the input bucket stream, converts, and writes the uuencoded stream to $out.
writeUUEncodingHeader()  : mixed
Writes out the header for a uuencoded part to the passed stream resource handle.

Constants

STREAM_FILTER_NAME

Name used when registering with stream_filter_register.

public mixed STREAM_FILTER_NAME = 'mailmimeparser-uuencode'

Properties

Methods

filter()

Filter implementation converts encoding before returning PSFS_PASS_ON.

public filter(resource $in, resource $out, int &$consumed, bool $closing) : int
Parameters
$in : resource
$out : resource
$consumed : int
$closing : bool
Return values
int

onCreate()

Sets up the leftovers object

public onCreate() : mixed
Return values
mixed

convertAndAppend()

UUEncodes the passed $data string and appends it to $out.

private convertAndAppend(string $data, resource $out) : mixed
Parameters
$data : string

data to convert

$out : resource

output bucket stream

Return values
mixed

getUUEncodingFooter()

Returns the footer for a uuencoded part.

private getUUEncodingFooter() : string
Return values
string

readAndConvert()

Reads from the input bucket stream, converts, and writes the uuencoded stream to $out.

private readAndConvert(resource $in, resource $out, int &$consumed) : mixed
Parameters
$in : resource

input bucket stream

$out : resource

output bucket stream

$consumed : int

incremented by number of bytes read from $in

Return values
mixed

writeUUEncodingHeader()

Writes out the header for a uuencoded part to the passed stream resource handle.

private writeUUEncodingHeader(resource $out) : mixed
Parameters
$out : resource
Return values
mixed

Search results