Gdata/App/MediaFileSource.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Gdata
- Subpackage
- App
- Version
- $Id$
\Zend_Gdata_App_MediaFileSource
Package: Zend_Gdata\App





Concrete class to use a file handle as an attachment within a MediaEntry.
- Parent(s)
- \Zend_Gdata_App_BaseMediaSource
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

string $_contentType = nullThe content type for the file attached (example image/png)
Default value
nullDetails- Type
- string
Methods

__construct(string $filename) : voidCreate a new Zend_Gdata_App_MediaFileSource object.
Parameters
| Name | Type | Description |
|---|---|---|
| $filename | string | The name of the file to read from. |

encode() : stringReturn the MIME multipart representation of this MediaEntry.
Returns
Throws
| Type | Description |
|---|---|
| string |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_IOException |

getContentType() : stringThe content type for the file attached (example image/png)
Returns
| Type | Description |
|---|---|
| string | The content type |

setContentType(string $value) : \Zend_Gdata_App_MediaFileSourceSet the content type for the file attached (example image/png)
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $value | string | The content type |
| Type | Description |
|---|---|
| \Zend_Gdata_App_MediaFileSource | Provides a fluent interface |

setFilename(string $value) : \Zend_Gdata_App_MediaFileSourceSet the filename which is to be read.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $value | string | The desired file handle. |
| Type | Description |
|---|---|
| \Zend_Gdata_App_MediaFileSource | Provides a fluent interface. |