## API Documentation

# Gdata/YouTube/VideoQuery.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
  YouTube
version
  $Id: VideoQuery.php 23775 2011-03-01 17:25:24Z ralph $

## \Zend_Gdata_YouTube_VideoQuery
jump to top

Assists in constructing queries for YouTube videos

Queries are not defined for APP, but are provided by Gdata services as an extension.

Extends from
  \Zend_Gdata_Query
category
  Zend
copyright
  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
license
  New BSD License
link
  http://code.google.com/apis/youtube/
package
  Zend_Gdata
subpackage
  YouTube

### Methods

`__construct( $url = null ) : void`

Create Gdata_YouTube_VideoQuery object

Parameters

Name | Type | Description
--- | --- | ---
$url |  |

`__get( $name ) : void`

Inherited from: \Zend_Gdata_Query::__get()
Parameters

Name | Type | Description
--- | --- | ---
$name |  |

`__set( $name, $val ) : void`

Inherited from: \Zend_Gdata_Query::__set()
Parameters

Name | Type | Description
--- | --- | ---
$name |  |
$val |  |

`getAlt( ) : string`

Inherited from: \Zend_Gdata_Query::getAlt()
Returns

Type | Description
--- | ---
string | rss or atom

`getAuthor( ) : string`

Inherited from: \Zend_Gdata_Query::getAuthor()
Returns

Type | Description
--- | ---
string | author

`getCategory( ) : void`

Inherited from: \Zend_Gdata_Query::getCategory()
`getFormat( ) : string|null`

Return the value of the format parameter

Returns

Type | Description
--- | ---
stringnull | The value of format if it exists, null otherwise.

`getLocation( ) : string|null`

Get the value of the location parameter

Returns

Type | Description
--- | ---
stringnull | Return the location if it exists, null otherwise.

`getLocationRadius( ) : string|null`

Get the value of the location-radius parameter

Returns

Type | Description
--- | ---
stringnull | Return the location-radius if it exists, null otherwise.

`getMaxResults( ) : int`

Inherited from: \Zend_Gdata_Query::getMaxResults()
Returns

Type | Description
--- | ---
int | maxResults

`getOrderBy( ) : string|null`

Return the value of the orderby parameter if it exists

Returns

Type | Description
--- | ---
stringnull | The value of orderby if it exists, null otherwise.

`getParam( string $name ) : void`

Inherited from: \Zend_Gdata_Query::getParam()
Parameters

Name | Type | Description
--- | --- | ---
$name | string |

`getPublishedMax( ) : string`

Inherited from: \Zend_Gdata_Query::getPublishedMax()
Returns

Type | Description
--- | ---
string | publishedMax

`getPublishedMin( ) : string`

Inherited from: \Zend_Gdata_Query::getPublishedMin()
Returns

Type | Description
--- | ---
string | publishedMin

`getQuery( ) : string`

Inherited from: \Zend_Gdata_Query::getQuery()
Returns

Type | Description
--- | ---
string | query

`getQueryString( integer $majorProtocolVersion = null, integer $minorProtocolVersion = null ) : string`

Generate the query string from the URL parameters, optionally modifying them based on protocol version.

Parameters

Name | Type | Description
--- | --- | ---
$majorProtocolVersion | integer | The major protocol version
$minorProtocolVersion | integer | The minor protocol version

Returns

Type | Description
--- | ---
string | querystring

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_VersionException |

`getQueryUrl( integer $majorProtocolVersion = null, integer $minorProtocolVersion = null ) : string`

Returns the generated full query URL, optionally modifying it based on the protocol version.

Parameters

Name | Type | Description
--- | --- | ---
$majorProtocolVersion | integer | The major protocol version
$minorProtocolVersion | integer | The minor protocol version

Returns

Type | Description
--- | ---
string | The URL

`getRacy( ) : string|null`

Whether or not to include racy videos in the search results

Returns

Type | Description
--- | ---
stringnull | The value of racy if it exists, null otherwise.

`getSafeSearch( ) : string|null`

Return the value of the safeSearch parameter

Returns

Type | Description
--- | ---
stringnull | The value of the safeSearch parameter if it has been set, null otherwise.

`getStartIndex( ) : int`

Inherited from: \Zend_Gdata_Query::getStartIndex()
Returns

Type | Description
--- | ---
int | startIndex

`getTime( ) : string|null`

Return the value of the time parameter

Returns

Type | Description
--- | ---
stringnull | The time parameter if it exists, null otherwise.

`getUpdatedMax( ) : string`

Inherited from: \Zend_Gdata_Query::getUpdatedMax()
Returns

Type | Description
--- | ---
string | updatedMax

`getUpdatedMin( ) : string`

Inherited from: \Zend_Gdata_Query::getUpdatedMin()
Returns

Type | Description
--- | ---
string | updatedMin

`getVideoQuery( ) : string|null`

Return the value of the video query that has been set

Returns

Type | Description
--- | ---
stringnull | The value of the video query if it exists, null otherwise.

`resetParameters( ) : void`

Inherited from: \Zend_Gdata_Query::resetParameters()
`setAlt( string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setAlt()
Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setAuthor( string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setAuthor()
Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setCategory( string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setCategory()
Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setFeedType( string $feedType, string $videoId = null, string $entry = null ) : void`

Sets the type of feed this query should be used to search

Parameters

Name | Type | Description
--- | --- | ---
$feedType | string | The type of feed
$videoId | string | The ID of the video associated with this query
$entry | string | The ID of the entry associated with this query

`setFormat( string $value = null ) : \Zend_Gdata_YouTube_VideoQuery`

Sets the param to return videos of a specific format

Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_VideoQuery | Provides a fluent interface

`setLocation( string $value ) : \Zend_Gdata_YouTube_VideoQuery`

Sets the location parameter for the query

Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_VideoQuery | Provides a fluent interface

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_InvalidArgumentException |

`setLocationRadius( string $value ) : \Zend_Gdata_YouTube_VideoQuery`

Sets the location-radius parameter for the query

Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_VideoQuery | Provides a fluent interface

`setMaxResults( int $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setMaxResults()
Parameters

Name | Type | Description
--- | --- | ---
$value | int |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setOrderBy( string $value ) : \Zend_Gdata_YouTube_Query`

Set the value of the orderby parameter

Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_Query | Provides a fluent interface

`setParam( string $name, string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setParam()
Parameters

Name | Type | Description
--- | --- | ---
$name | string |
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setPublishedMax( string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setPublishedMax()
Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setPublishedMin( string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setPublishedMin()
Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setQuery( string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setQuery()
Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setRacy( string $value = null ) : \Zend_Gdata_YouTube_VideoQuery`

Sets whether or not to include racy videos in the search results

Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_VideoQuery | Provides a fluent interface

`setSafeSearch( string $value ) : \Zend_Gdata_YouTube_VideoQuery`

Set the safeSearch parameter

Parameters

Name | Type | Description
--- | --- | ---
$value | string | The value of the parameter, currently only 'none', 'moderate' or 'strict' are allowed values.

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_VideoQuery | Provides a fluent interface

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_InvalidArgumentException |

`setStartIndex( int $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setStartIndex()
Parameters

Name | Type | Description
--- | --- | ---
$value | int |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setTime( string $value = null ) : \Zend_Gdata_YouTube_VideoQuery`

Sets the time period over which this query should apply

Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_VideoQuery | Provides a fluent interface

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_InvalidArgumentException |

`setUpdatedMax( string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setUpdatedMax()
Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setUpdatedMin( string $value ) : \Zend_Gdata_Query`

Inherited from: \Zend_Gdata_Query::setUpdatedMin()
Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_Query | Provides a fluent interface

`setUploader( string $value = null ) : \Zend_Gdata_YouTube_VideoQuery`

Sets the value of the uploader parameter

Parameters

Name | Type | Description
--- | --- | ---
$value | string | The value of the uploader parameter. Currently this can only be set to the value of 'partner'.

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_VideoQuery | Provides a fluent interface

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_InvalidArgumentException |

`setVideoQuery( string $value = null ) : \Zend_Gdata_YouTube_VideoQuery`

Sets the formatted video query (vq) URL param value

Parameters

Name | Type | Description
--- | --- | ---
$value | string |

Returns

Type | Description
--- | ---
\Zend_Gdata_YouTube_VideoQuery | Provides a fluent interface

Documentation was generated by DocBlox 0.13.3.