A streaming Media MIME class that allows for buffered read operations.

category Zend
package Zend_Gdata
subpackage Gdata
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Create a new MimeMediaStream object.

__construct(string $xmlString = null, string $filePath = null, string $fileContentType = null

Parameters

$xmlString

string

The string corresponding to the XML section of the message, typically an atom entry or feed.

$filePath

string

The path to the file that constitutes the binary part of the message.

$fileContentType

string

The valid internet media type of the file.

Exceptions

\Zend_Gdata_App_IOException If the file cannot be read or does not exist. Also if mbstring.func_overload has been set > 1.

Close the internal file that we are streaming to the socket.

closeFileHandle() : void

Return a Content-type header that includes the current boundary string.

getContentType() : string

Returns

stringA valid HTTP Content-Type header.

Return the total size of the mime message.

getTotalSize() : integer

Returns

integerTotal size of the message to be sent.

Read a specific chunk of the the MIME multipart message.

read($bytesRequested) : string

Parameters

$bytesRequested

Returns

stringA corresponding piece of the message. This could be binary or regular text.

Sandwiches the entry body into a MIME message

wrapEntry($entry, $fileMimeType) : void

Parameters

$entry

$fileMimeType

 Properties

 

A valid MIME boundary.

$_boundaryString : string

Default

null
 

The current part being read from.

$_currentPart : integer

Default

0
 

A handle to the file that is part of the message.

$_fileHandle : resource

Default

null
 

An array of all the parts to be sent. Array members are either a MimeFile or a MimeBodyString object.

$_parts : array

Default

null
 

The size of the MIME message.

$_totalSize : integer

Default

0