Concrete class to use a file handle as an attachment within a MediaEntry.

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

 Methods

Create a new Zend_Gdata_App_MediaFileSource object.

__construct(string $filename) 

Parameters

$filename

string

The name of the file to read from.

Magic getter to allow acces like $source->foo to call $source->getFoo() Alternatively, if no getFoo() is defined, but a $_foo protected variable is defined, this is returned.

__get(string $name) 
Inherited

TODO Remove ability to bypass getFoo() methods??

Parameters

$name

string

The variable name sought

Magic __isset method

__isset(string $name) 
Inherited

Parameters

$name

string

Magic setter to allow acces like $source->foo='bar' to call $source->setFoo('bar') automatically.

__set(string $name, $val) 
Inherited

Alternatively, if no setFoo() is defined, but a $_foo protected variable is defined, this is returned.

Parameters

$name

string

$val

Alias for getFilename().

__toString() : string

Returns

string

Return the MIME multipart representation of this MediaEntry.

encode() : string

Exceptions

\Zend_Gdata_App_IOException

Returns

string

The content type for the file attached (example image/png)

getContentType() : string
inherited_from \Zend_Gdata_App_BaseMediaSource::getContentType()

Returns

stringThe content type

The content type for the attached file (example image/png)

getContentType() : string
Inherited
inherited_from \Zend_Gdata_App_MediaSource::getContentType()

Returns

stringThe content type

Get the filename associated with this reader.

getFilename() : string

Returns

string

Returns the Slug header value. Used by some services to determine the title for the uploaded file. Returns null if no slug should be used.

getSlug() : string
Inherited
inherited_from \Zend_Gdata_App_MediaSource::getSlug()

Returns

string

Set the content type for the file attached (example image/png)

setContentType(string $value) : \Zend_Gdata_App_MediaFileSource
inherited_from \Zend_Gdata_App_BaseMediaSource::setContentType()

Parameters

$value

string

The content type

Returns

\Zend_Gdata_App_MediaFileSourceProvides a fluent interface

Set the content type for the file attached (example image/png)

setContentType(string $value) : \Zend_Gdata_App_MediaFileSource
Inherited
inherited_from \Zend_Gdata_App_MediaSource::setContentType()

Parameters

$value

string

The content type

Returns

\Zend_Gdata_App_MediaFileSourceProvides a fluent interface

Set the filename which is to be read.

setFilename(string $value) : \Zend_Gdata_App_MediaFileSource

Parameters

$value

string

The desired file handle.

Returns

\Zend_Gdata_App_MediaFileSourceProvides a fluent interface.

Sets the Slug header value. Used by some services to determine the title for the uploaded file. A null value indicates no slug header.

setSlug($value) : \Zend_Gdata_App_MediaSource
Inherited
var

The slug value

inherited_from \Zend_Gdata_App_MediaSource::setSlug()

Parameters

$value

Returns

\Zend_Gdata_App_MediaSourceProvides a fluent interface

 Properties

 

The content type for the file attached (example image/png)

$_contentType : string

Default

null
inherited_from \Zend_Gdata_App_BaseMediaSource::_contentType
 

The content type for the attached file (example image/png)

$_contentType : string

Default

null
 

The filename which is represented

$_filename : string

Default

null
 

The slug header value representing the attached file title, or null if no slug should be used. The slug header is only necessary in some cases, usually when a multipart upload is not being performed.

$_slug : string

Default

null