API Documentation

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Gdata  
subpackage
App  
version
$Id: MediaFileSource.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Gdata_App_MediaFileSource

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

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

Properties

Propertyprotectedstring  $_contentType= 'null'

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

Default valuenullDetails
Type
string
Propertyprotectedstring  $_filename= 'null'

The filename which is represented

Default valuenullDetails
Type
string

Methods

methodpublic__construct( string $filename ) : void

Create a new Zend_Gdata_App_MediaFileSource object.

Parameters
Name Type Description
$filename string The name of the file to read from.
methodpublic__get( string $name ) : void

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.

Inherited from: \Zend_Gdata_App_BaseMediaSource::__get()

TODO Remove ability to bypass getFoo() methods??

Parameters
Name Type Description
$name string The variable name sought
methodpublic__toString( ) : string

Alias for getFilename().

Returns
Type Description
string
methodpublicencode( ) : string

Return the MIME multipart representation of this MediaEntry.

Returns
Type Description
string
Throws
Exception Description
\Zend_Gdata_App_IOException
methodpublicgetContentType( ) : string

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

Returns
Type Description
string The content type
methodpublicgetFilename( ) : string

Get the filename associated with this reader.

Returns
Type Description
string
methodpublicgetSlug( ) : 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.

Inherited from: \Zend_Gdata_App_BaseMediaSource::getSlug()
Returns
Type Description
string
methodpublicsetContentType( string $value ) : \Zend_Gdata_App_MediaFileSource

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

Parameters
Name Type Description
$value string The content type
Returns
Type Description
\Zend_Gdata_App_MediaFileSource Provides a fluent interface
methodpublicsetFilename( string $value ) : \Zend_Gdata_App_MediaFileSource

Set the filename which is to be read.

Parameters
Name Type Description
$value string The desired file handle.
Returns
Type Description
\Zend_Gdata_App_MediaFileSource Provides a fluent interface.
methodpublicsetSlug(  $value ) : \Zend_Gdata_App_MediaSource

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

Inherited from: \Zend_Gdata_App_BaseMediaSource::setSlug()
Parameters
Name Type Description
$value
Returns
Type Description
\Zend_Gdata_App_MediaSource Provides a fluent interface
Details
string
The slug value
Documentation was generated by DocBlox 0.13.3.