| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041 |
- <?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
- * @package Zend_Gdata
- * @subpackage YouTube
- * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id$
- */
- /**
- * @see Zend_Gdata_Entry
- */
- require_once 'Zend/Gdata/Entry.php';
- /**
- * @see Zend_Gdata_Extension_FeedLink
- */
- require_once 'Zend/Gdata/Extension/FeedLink.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Description
- */
- require_once 'Zend/Gdata/YouTube/Extension/Description.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_AboutMe
- */
- require_once 'Zend/Gdata/YouTube/Extension/AboutMe.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Age
- */
- require_once 'Zend/Gdata/YouTube/Extension/Age.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Username
- */
- require_once 'Zend/Gdata/YouTube/Extension/Username.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Books
- */
- require_once 'Zend/Gdata/YouTube/Extension/Books.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Company
- */
- require_once 'Zend/Gdata/YouTube/Extension/Company.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Hobbies
- */
- require_once 'Zend/Gdata/YouTube/Extension/Hobbies.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Hometown
- */
- require_once 'Zend/Gdata/YouTube/Extension/Hometown.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Location
- */
- require_once 'Zend/Gdata/YouTube/Extension/Location.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Movies
- */
- require_once 'Zend/Gdata/YouTube/Extension/Movies.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Music
- */
- require_once 'Zend/Gdata/YouTube/Extension/Music.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Occupation
- */
- require_once 'Zend/Gdata/YouTube/Extension/Occupation.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_School
- */
- require_once 'Zend/Gdata/YouTube/Extension/School.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Gender
- */
- require_once 'Zend/Gdata/YouTube/Extension/Gender.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Relationship
- */
- require_once 'Zend/Gdata/YouTube/Extension/Relationship.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_FirstName
- */
- require_once 'Zend/Gdata/YouTube/Extension/FirstName.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_LastName
- */
- require_once 'Zend/Gdata/YouTube/Extension/LastName.php';
- /**
- * @see Zend_Gdata_YouTube_Extension_Statistics
- */
- require_once 'Zend/Gdata/YouTube/Extension/Statistics.php';
- /**
- * @see Zend_Gdata_Media_Extension_MediaThumbnail
- */
- require_once 'Zend/Gdata/Media/Extension/MediaThumbnail.php';
- /**
- * Represents the YouTube video playlist flavor of an Atom entry
- *
- * @category Zend
- * @package Zend_Gdata
- * @subpackage YouTube
- * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license http://framework.zend.com/license/new-bsd New BSD License
- */
- class Zend_Gdata_YouTube_UserProfileEntry extends Zend_Gdata_Entry
- {
- protected $_entryClassName = 'Zend_Gdata_YouTube_UserProfileEntry';
- /**
- * Nested feed links
- *
- * @var array
- */
- protected $_feedLink = array();
- /**
- * The username for this profile entry
- *
- * @var string
- */
- protected $_username = null;
- /**
- * The description of the user
- *
- * @var string
- */
- protected $_description = null;
- /**
- * The contents of the 'About Me' field.
- *
- * @var string
- */
- protected $_aboutMe = null;
- /**
- * The age of the user
- *
- * @var int
- */
- protected $_age = null;
- /**
- * Books of interest to the user
- *
- * @var string
- */
- protected $_books = null;
- /**
- * Company
- *
- * @var string
- */
- protected $_company = null;
- /**
- * Hobbies
- *
- * @var string
- */
- protected $_hobbies = null;
- /**
- * Hometown
- *
- * @var string
- */
- protected $_hometown = null;
- /**
- * Location
- *
- * @var string
- */
- protected $_location = null;
- /**
- * Movies
- *
- * @var string
- */
- protected $_movies = null;
- /**
- * Music
- *
- * @var string
- */
- protected $_music = null;
- /**
- * Occupation
- *
- * @var string
- */
- protected $_occupation = null;
- /**
- * School
- *
- * @var string
- */
- protected $_school = null;
- /**
- * Gender
- *
- * @var string
- */
- protected $_gender = null;
- /**
- * Relationship
- *
- * @var string
- */
- protected $_relationship = null;
- /**
- * First name
- *
- * @var string
- */
- protected $_firstName = null;
- /**
- * Last name
- *
- * @var string
- */
- protected $_lastName = null;
- /**
- * Statistics
- *
- * @var Zend_Gdata_YouTube_Extension_Statistics
- */
- protected $_statistics = null;
- /**
- * Thumbnail
- *
- * @var Zend_Gdata_Media_Extension_MediaThumbnail
- */
- protected $_thumbnail = null;
- /**
- * Creates a User Profile entry, representing an individual user
- * and their attributes.
- *
- * @param DOMElement $element (optional) DOMElement from which this
- * object should be constructed.
- */
- public function __construct($element = null)
- {
- $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
- parent::__construct($element);
- }
- /**
- * Retrieves a DOMElement which corresponds to this element and all
- * child properties. This is used to build an entry back into a DOM
- * and eventually XML text for sending to the server upon updates, or
- * for application storage/persistence.
- *
- * @param DOMDocument $doc The DOMDocument used to construct DOMElements
- * @return DOMElement The DOMElement representing this element and all
- * child properties.
- */
- public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
- {
- $element = parent::getDOM($doc, $majorVersion, $minorVersion);
- if ($this->_description != null) {
- $element->appendChild($this->_description->getDOM($element->ownerDocument));
- }
- if ($this->_aboutMe != null) {
- $element->appendChild($this->_aboutMe->getDOM($element->ownerDocument));
- }
- if ($this->_age != null) {
- $element->appendChild($this->_age->getDOM($element->ownerDocument));
- }
- if ($this->_username != null) {
- $element->appendChild($this->_username->getDOM($element->ownerDocument));
- }
- if ($this->_books != null) {
- $element->appendChild($this->_books->getDOM($element->ownerDocument));
- }
- if ($this->_company != null) {
- $element->appendChild($this->_company->getDOM($element->ownerDocument));
- }
- if ($this->_hobbies != null) {
- $element->appendChild($this->_hobbies->getDOM($element->ownerDocument));
- }
- if ($this->_hometown != null) {
- $element->appendChild($this->_hometown->getDOM($element->ownerDocument));
- }
- if ($this->_location != null) {
- $element->appendChild($this->_location->getDOM($element->ownerDocument));
- }
- if ($this->_movies != null) {
- $element->appendChild($this->_movies->getDOM($element->ownerDocument));
- }
- if ($this->_music != null) {
- $element->appendChild($this->_music->getDOM($element->ownerDocument));
- }
- if ($this->_occupation != null) {
- $element->appendChild($this->_occupation->getDOM($element->ownerDocument));
- }
- if ($this->_school != null) {
- $element->appendChild($this->_school->getDOM($element->ownerDocument));
- }
- if ($this->_gender != null) {
- $element->appendChild($this->_gender->getDOM($element->ownerDocument));
- }
- if ($this->_relationship != null) {
- $element->appendChild($this->_relationship->getDOM($element->ownerDocument));
- }
- if ($this->_firstName != null) {
- $element->appendChild($this->_firstName->getDOM($element->ownerDocument));
- }
- if ($this->_lastName != null) {
- $element->appendChild($this->_lastName->getDOM($element->ownerDocument));
- }
- if ($this->_statistics != null) {
- $element->appendChild($this->_statistics->getDOM($element->ownerDocument));
- }
- if ($this->_thumbnail != null) {
- $element->appendChild($this->_thumbnail->getDOM($element->ownerDocument));
- }
- if ($this->_feedLink != null) {
- foreach ($this->_feedLink as $feedLink) {
- $element->appendChild($feedLink->getDOM($element->ownerDocument));
- }
- }
- return $element;
- }
- /**
- * Creates individual Entry objects of the appropriate type and
- * stores them in the $_entry array based upon DOM data.
- *
- * @param DOMNode $child The DOMNode to process
- */
- protected function takeChildFromDOM($child)
- {
- $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
- switch ($absoluteNodeName) {
- case $this->lookupNamespace('yt') . ':' . 'description':
- $description = new Zend_Gdata_YouTube_Extension_Description();
- $description->transferFromDOM($child);
- $this->_description = $description;
- break;
- case $this->lookupNamespace('yt') . ':' . 'aboutMe':
- $aboutMe = new Zend_Gdata_YouTube_Extension_AboutMe();
- $aboutMe->transferFromDOM($child);
- $this->_aboutMe = $aboutMe;
- break;
- case $this->lookupNamespace('yt') . ':' . 'age':
- $age = new Zend_Gdata_YouTube_Extension_Age();
- $age->transferFromDOM($child);
- $this->_age = $age;
- break;
- case $this->lookupNamespace('yt') . ':' . 'username':
- $username = new Zend_Gdata_YouTube_Extension_Username();
- $username->transferFromDOM($child);
- $this->_username = $username;
- break;
- case $this->lookupNamespace('yt') . ':' . 'books':
- $books = new Zend_Gdata_YouTube_Extension_Books();
- $books->transferFromDOM($child);
- $this->_books = $books;
- break;
- case $this->lookupNamespace('yt') . ':' . 'company':
- $company = new Zend_Gdata_YouTube_Extension_Company();
- $company->transferFromDOM($child);
- $this->_company = $company;
- break;
- case $this->lookupNamespace('yt') . ':' . 'hobbies':
- $hobbies = new Zend_Gdata_YouTube_Extension_Hobbies();
- $hobbies->transferFromDOM($child);
- $this->_hobbies = $hobbies;
- break;
- case $this->lookupNamespace('yt') . ':' . 'hometown':
- $hometown = new Zend_Gdata_YouTube_Extension_Hometown();
- $hometown->transferFromDOM($child);
- $this->_hometown = $hometown;
- break;
- case $this->lookupNamespace('yt') . ':' . 'location':
- $location = new Zend_Gdata_YouTube_Extension_Location();
- $location->transferFromDOM($child);
- $this->_location = $location;
- break;
- case $this->lookupNamespace('yt') . ':' . 'movies':
- $movies = new Zend_Gdata_YouTube_Extension_Movies();
- $movies->transferFromDOM($child);
- $this->_movies = $movies;
- break;
- case $this->lookupNamespace('yt') . ':' . 'music':
- $music = new Zend_Gdata_YouTube_Extension_Music();
- $music->transferFromDOM($child);
- $this->_music = $music;
- break;
- case $this->lookupNamespace('yt') . ':' . 'occupation':
- $occupation = new Zend_Gdata_YouTube_Extension_Occupation();
- $occupation->transferFromDOM($child);
- $this->_occupation = $occupation;
- break;
- case $this->lookupNamespace('yt') . ':' . 'school':
- $school = new Zend_Gdata_YouTube_Extension_School();
- $school->transferFromDOM($child);
- $this->_school = $school;
- break;
- case $this->lookupNamespace('yt') . ':' . 'gender':
- $gender = new Zend_Gdata_YouTube_Extension_Gender();
- $gender->transferFromDOM($child);
- $this->_gender = $gender;
- break;
- case $this->lookupNamespace('yt') . ':' . 'relationship':
- $relationship = new Zend_Gdata_YouTube_Extension_Relationship();
- $relationship->transferFromDOM($child);
- $this->_relationship = $relationship;
- break;
- case $this->lookupNamespace('yt') . ':' . 'firstName':
- $firstName = new Zend_Gdata_YouTube_Extension_FirstName();
- $firstName->transferFromDOM($child);
- $this->_firstName = $firstName;
- break;
- case $this->lookupNamespace('yt') . ':' . 'lastName':
- $lastName = new Zend_Gdata_YouTube_Extension_LastName();
- $lastName->transferFromDOM($child);
- $this->_lastName = $lastName;
- break;
- case $this->lookupNamespace('yt') . ':' . 'statistics':
- $statistics = new Zend_Gdata_YouTube_Extension_Statistics();
- $statistics->transferFromDOM($child);
- $this->_statistics = $statistics;
- break;
- case $this->lookupNamespace('media') . ':' . 'thumbnail':
- $thumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail();
- $thumbnail->transferFromDOM($child);
- $this->_thumbnail = $thumbnail;
- break;
- case $this->lookupNamespace('gd') . ':' . 'feedLink':
- $feedLink = new Zend_Gdata_Extension_FeedLink();
- $feedLink->transferFromDOM($child);
- $this->_feedLink[] = $feedLink;
- break;
- default:
- parent::takeChildFromDOM($child);
- break;
- }
- }
- /**
- * Sets the content of the 'about me' field.
- *
- * @param Zend_Gdata_YouTube_Extension_AboutMe $aboutMe The 'about me'
- * information.
- * @throws Zend_Gdata_App_VersionException
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setAboutMe($aboutMe = null)
- {
- if (($this->getMajorProtocolVersion() == null) ||
- ($this->getMajorProtocolVersion() == 1)) {
- require_once 'Zend/Gdata/App/VersionException.php';
- throw new Zend_Gdata_App_VersionException('The setAboutMe ' .
- ' method is only supported as of version 2 of the YouTube ' .
- 'API.');
- } else {
- $this->_aboutMe = $aboutMe;
- return $this;
- }
- }
- /**
- * Returns the contents of the 'about me' field.
- *
- * @throws Zend_Gdata_App_VersionException
- * @return Zend_Gdata_YouTube_Extension_AboutMe The 'about me' information
- */
- public function getAboutMe()
- {
- if (($this->getMajorProtocolVersion() == null) ||
- ($this->getMajorProtocolVersion() == 1)) {
- require_once 'Zend/Gdata/App/VersionException.php';
- throw new Zend_Gdata_App_VersionException('The getAboutMe ' .
- ' method is only supported as of version 2 of the YouTube ' .
- 'API.');
- } else {
- return $this->_aboutMe;
- }
- }
- /**
- * Sets the content of the 'first name' field.
- *
- * @param Zend_Gdata_YouTube_Extension_FirstName $firstName The first name
- * @throws Zend_Gdata_App_VersionException
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setFirstName($firstName = null)
- {
- if (($this->getMajorProtocolVersion() == null) ||
- ($this->getMajorProtocolVersion() == 1)) {
- require_once 'Zend/Gdata/App/VersionException.php';
- throw new Zend_Gdata_App_VersionException('The setFirstName ' .
- ' method is only supported as of version 2 of the YouTube ' .
- 'API.');
- } else {
- $this->_firstName = $firstName;
- return $this;
- }
- }
- /**
- * Returns the first name
- *
- * @throws Zend_Gdata_App_VersionException
- * @return Zend_Gdata_YouTube_Extension_FirstName The first name
- */
- public function getFirstName()
- {
- if (($this->getMajorProtocolVersion() == null) ||
- ($this->getMajorProtocolVersion() == 1)) {
- require_once 'Zend/Gdata/App/VersionException.php';
- throw new Zend_Gdata_App_VersionException('The getFirstName ' .
- ' method is only supported as of version 2 of the YouTube ' .
- 'API.');
- } else {
- return $this->_firstName;
- }
- }
- /**
- * Sets the content of the 'last name' field.
- *
- * @param Zend_Gdata_YouTube_Extension_LastName $lastName The last name
- * @throws Zend_Gdata_App_VersionException
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setLastName($lastName = null)
- {
- if (($this->getMajorProtocolVersion() == null) ||
- ($this->getMajorProtocolVersion() == 1)) {
- require_once 'Zend/Gdata/App/VersionException.php';
- throw new Zend_Gdata_App_VersionException('The setLastName ' .
- ' method is only supported as of version 2 of the YouTube ' .
- 'API.');
- } else {
- $this->_lastName = $lastName;
- return $this;
- }
- }
- /**
- * Returns the last name
- *
- * @throws Zend_Gdata_App_VersionException
- * @return Zend_Gdata_YouTube_Extension_LastName The last name
- */
- public function getLastName()
- {
- if (($this->getMajorProtocolVersion() == null) ||
- ($this->getMajorProtocolVersion() == 1)) {
- require_once 'Zend/Gdata/App/VersionException.php';
- throw new Zend_Gdata_App_VersionException('The getLastName ' .
- ' method is only supported as of version 2 of the YouTube ' .
- 'API.');
- } else {
- return $this->_lastName;
- }
- }
- /**
- * Returns the statistics
- *
- * @throws Zend_Gdata_App_VersionException
- * @return Zend_Gdata_YouTube_Extension_Statistics The profile statistics
- */
- public function getStatistics()
- {
- if (($this->getMajorProtocolVersion() == null) ||
- ($this->getMajorProtocolVersion() == 1)) {
- require_once 'Zend/Gdata/App/VersionException.php';
- throw new Zend_Gdata_App_VersionException('The getStatistics ' .
- ' method is only supported as of version 2 of the YouTube ' .
- 'API.');
- } else {
- return $this->_statistics;
- }
- }
- /**
- * Returns the thumbnail
- *
- * @throws Zend_Gdata_App_VersionException
- * @return Zend_Gdata_Media_Extension_MediaThumbnail The profile thumbnail
- */
- public function getThumbnail()
- {
- if (($this->getMajorProtocolVersion() == null) ||
- ($this->getMajorProtocolVersion() == 1)) {
- require_once 'Zend/Gdata/App/VersionException.php';
- throw new Zend_Gdata_App_VersionException('The getThumbnail ' .
- ' method is only supported as of version 2 of the YouTube ' .
- 'API.');
- } else {
- return $this->_thumbnail;
- }
- }
- /**
- * Sets the age
- *
- * @param Zend_Gdata_YouTube_Extension_Age $age The age
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setAge($age = null)
- {
- $this->_age = $age;
- return $this;
- }
- /**
- * Returns the age
- *
- * @return Zend_Gdata_YouTube_Extension_Age The age
- */
- public function getAge()
- {
- return $this->_age;
- }
- /**
- * Sets the username
- *
- * @param Zend_Gdata_YouTube_Extension_Username $username The username
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setUsername($username = null)
- {
- $this->_username = $username;
- return $this;
- }
- /**
- * Returns the username
- *
- * @return Zend_Gdata_YouTube_Extension_Username The username
- */
- public function getUsername()
- {
- return $this->_username;
- }
- /**
- * Sets the books
- *
- * @param Zend_Gdata_YouTube_Extension_Books $books The books
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setBooks($books = null)
- {
- $this->_books = $books;
- return $this;
- }
- /**
- * Returns the books
- *
- * @return Zend_Gdata_YouTube_Extension_Books The books
- */
- public function getBooks()
- {
- return $this->_books;
- }
- /**
- * Sets the company
- *
- * @param Zend_Gdata_YouTube_Extension_Company $company The company
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setCompany($company = null)
- {
- $this->_company = $company;
- return $this;
- }
- /**
- * Returns the company
- *
- * @return Zend_Gdata_YouTube_Extension_Company The company
- */
- public function getCompany()
- {
- return $this->_company;
- }
- /**
- * Sets the hobbies
- *
- * @param Zend_Gdata_YouTube_Extension_Hobbies $hobbies The hobbies
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setHobbies($hobbies = null)
- {
- $this->_hobbies = $hobbies;
- return $this;
- }
- /**
- * Returns the hobbies
- *
- * @return Zend_Gdata_YouTube_Extension_Hobbies The hobbies
- */
- public function getHobbies()
- {
- return $this->_hobbies;
- }
- /**
- * Sets the hometown
- *
- * @param Zend_Gdata_YouTube_Extension_Hometown $hometown The hometown
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setHometown($hometown = null)
- {
- $this->_hometown = $hometown;
- return $this;
- }
- /**
- * Returns the hometown
- *
- * @return Zend_Gdata_YouTube_Extension_Hometown The hometown
- */
- public function getHometown()
- {
- return $this->_hometown;
- }
- /**
- * Sets the location
- *
- * @param Zend_Gdata_YouTube_Extension_Location $location The location
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setLocation($location = null)
- {
- $this->_location = $location;
- return $this;
- }
- /**
- * Returns the location
- *
- * @return Zend_Gdata_YouTube_Extension_Location The location
- */
- public function getLocation()
- {
- return $this->_location;
- }
- /**
- * Sets the movies
- *
- * @param Zend_Gdata_YouTube_Extension_Movies $movies The movies
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setMovies($movies = null)
- {
- $this->_movies = $movies;
- return $this;
- }
- /**
- * Returns the movies
- *
- * @return Zend_Gdata_YouTube_Extension_Movies The movies
- */
- public function getMovies()
- {
- return $this->_movies;
- }
- /**
- * Sets the music
- *
- * @param Zend_Gdata_YouTube_Extension_Music $music The music
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setMusic($music = null)
- {
- $this->_music = $music;
- return $this;
- }
- /**
- * Returns the music
- *
- * @return Zend_Gdata_YouTube_Extension_Music The music
- */
- public function getMusic()
- {
- return $this->_music;
- }
- /**
- * Sets the occupation
- *
- * @param Zend_Gdata_YouTube_Extension_Occupation $occupation The occupation
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setOccupation($occupation = null)
- {
- $this->_occupation = $occupation;
- return $this;
- }
- /**
- * Returns the occupation
- *
- * @return Zend_Gdata_YouTube_Extension_Occupation The occupation
- */
- public function getOccupation()
- {
- return $this->_occupation;
- }
- /**
- * Sets the school
- *
- * @param Zend_Gdata_YouTube_Extension_School $school The school
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setSchool($school = null)
- {
- $this->_school = $school;
- return $this;
- }
- /**
- * Returns the school
- *
- * @return Zend_Gdata_YouTube_Extension_School The school
- */
- public function getSchool()
- {
- return $this->_school;
- }
- /**
- * Sets the gender
- *
- * @param Zend_Gdata_YouTube_Extension_Gender $gender The gender
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setGender($gender = null)
- {
- $this->_gender = $gender;
- return $this;
- }
- /**
- * Returns the gender
- *
- * @return Zend_Gdata_YouTube_Extension_Gender The gender
- */
- public function getGender()
- {
- return $this->_gender;
- }
- /**
- * Sets the relationship
- *
- * @param Zend_Gdata_YouTube_Extension_Relationship $relationship The relationship
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setRelationship($relationship = null)
- {
- $this->_relationship = $relationship;
- return $this;
- }
- /**
- * Returns the relationship
- *
- * @return Zend_Gdata_YouTube_Extension_Relationship The relationship
- */
- public function getRelationship()
- {
- return $this->_relationship;
- }
- /**
- * Sets the array of embedded feeds related to the video
- *
- * @param array $feedLink The array of embedded feeds relating to the video
- * @return Zend_Gdata_YouTube_UserProfileEntry Provides a fluent interface
- */
- public function setFeedLink($feedLink = null)
- {
- $this->_feedLink = $feedLink;
- return $this;
- }
- /**
- * Get the feed link property for this entry.
- *
- * @see setFeedLink
- * @param string $rel (optional) The rel value of the link to be found.
- * If null, the array of links is returned.
- * @return mixed If $rel is specified, a Zend_Gdata_Extension_FeedLink
- * object corresponding to the requested rel value is returned
- * if found, or null if the requested value is not found. If
- * $rel is null or not specified, an array of all available
- * feed links for this entry is returned, or null if no feed
- * links are set.
- */
- public function getFeedLink($rel = null)
- {
- if ($rel == null) {
- return $this->_feedLink;
- } else {
- foreach ($this->_feedLink as $feedLink) {
- if ($feedLink->rel == $rel) {
- return $feedLink;
- }
- }
- return null;
- }
- }
- /**
- * Returns the URL in the gd:feedLink with the provided rel value
- *
- * @param string $rel The rel value to find
- * @return mixed Either the URL as a string or null if a feedLink wasn't
- * found with the provided rel value
- */
- public function getFeedLinkHref($rel)
- {
- $feedLink = $this->getFeedLink($rel);
- if ($feedLink !== null) {
- return $feedLink->href;
- } else {
- return null;
- }
- }
- /**
- * Returns the URL of the playlist list feed
- *
- * @return string The URL of the playlist video feed
- */
- public function getPlaylistListFeedUrl()
- {
- return $this->getFeedLinkHref(Zend_Gdata_YouTube::USER_PLAYLISTS_REL);
- }
- /**
- * Returns the URL of the uploads feed
- *
- * @return string The URL of the uploads video feed
- */
- public function getUploadsFeedUrl()
- {
- return $this->getFeedLinkHref(Zend_Gdata_YouTube::USER_UPLOADS_REL);
- }
- /**
- * Returns the URL of the subscriptions feed
- *
- * @return string The URL of the subscriptions feed
- */
- public function getSubscriptionsFeedUrl()
- {
- return $this->getFeedLinkHref(Zend_Gdata_YouTube::USER_SUBSCRIPTIONS_REL);
- }
- /**
- * Returns the URL of the contacts feed
- *
- * @return string The URL of the contacts feed
- */
- public function getContactsFeedUrl()
- {
- return $this->getFeedLinkHref(Zend_Gdata_YouTube::USER_CONTACTS_REL);
- }
- /**
- * Returns the URL of the favorites feed
- *
- * @return string The URL of the favorites feed
- */
- public function getFavoritesFeedUrl()
- {
- return $this->getFeedLinkHref(Zend_Gdata_YouTube::USER_FAVORITES_REL);
- }
- }
|