Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Gdata_MediaMimeStream Class Reference

Public Member Functions

 __construct ($xmlString=null, $filePath=null, $fileContentType=null)
 Create a new MimeMediaStream object.
 
 read ($bytesRequested)
 Read a specific chunk of the the MIME multipart message.
 
 getTotalSize ()
 Return the total size of the mime message.
 
 closeFileHandle ()
 Close the internal file that we are streaming to the socket.
 
 getContentType ()
 Return a Content-type header that includes the current boundary string.
 

Protected Attributes

 $_boundaryString = null
 
 $_fileHandle = null
 
 $_currentPart = 0
 
 $_totalSize = 0
 
 $_parts = null
 

Constructor & Destructor Documentation

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

Create a new MimeMediaStream object.

Parameters
string$xmlStringThe string corresponding to the XML section of the message, typically an atom entry or feed.
string$filePathThe path to the file that constitutes the binary part of the message.
string$fileContentTypeThe valid internet media type of the file.
Exceptions
Zend_Gdata_App_IOExceptionIf the file cannot be read or does not exist. Also if mbstring.func_overload has been set > 1.

Member Function Documentation

closeFileHandle ( )

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

Returns
void
getContentType ( )

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

Returns
string A valid HTTP Content-Type header.
getTotalSize ( )

Return the total size of the mime message.

Returns
integer Total size of the message to be sent.
read (   $bytesRequested)

Read a specific chunk of the the MIME multipart message.

Parameters
integer$bufferSizeThe size of the chunk that is to be read, must be lower than MAX_BUFFER_SIZE.
Returns
string A corresponding piece of the message. This could be binary or regular text.

Member Data Documentation

$_boundaryString = null
protected
$_currentPart = 0
protected
$_fileHandle = null
protected
$_parts = null
protected
$_totalSize = 0
protected