Gdata/App/MediaFileSource.php

Show: inherited
Table of Contents

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 [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Gdata  
Subpackage
App  
Version
$Id: MediaFileSource.php 24593 2012-01-05 20:35:02Z matthew $  

\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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

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
Propertyprotectedstring $_slug = null
inherited

The slug header value representing the attached file title, or null if no slug should be used.

Inherited from: \Zend_Gdata_App_BaseMediaSource::$$_slug

The slug header is only necessary in some cases, usually when a multipart upload is not being performed.

Default valuenullDetails
Type
string
Inherited_from
\Zend_Gdata_App_BaseMediaSource::$$_slug  

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
inherited

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__isset(string $name) : void
inherited

Magic __isset method

Inherited from: \Zend_Gdata_App_BaseMediaSource::__isset()
Parameters
Name Type Description
$name string
methodpublic__set(string $name,  $val) : void
inherited

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

Inherited from: \Zend_Gdata_App_BaseMediaSource::__set()

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

Parameters
Name Type Description
$name string
$val
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
inherited

Returns the Slug header value.

Inherited from: \Zend_Gdata_App_BaseMediaSource::getSlug()

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

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
inherited

Sets the Slug header value.

Inherited from: \Zend_Gdata_App_BaseMediaSource::setSlug()

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

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 phpDocumentor 2.0.0a8.