Explorar el Código

Merge pull request #684 from froschdesign/hotfix/575

Fixes #575 - Removes Zend_Gdata_YouTube which is based on Data API v2
Enrico Zimuel hace 9 años
padre
commit
206479c9c0
Se han modificado 100 ficheros con 0 adiciones y 15940 borrados
  1. 0 8
      documentation/manual/de/module_specs/Zend_Gdata-Introduction.xml
  2. 0 703
      documentation/manual/de/module_specs/Zend_Gdata_YouTube.xml
  3. 0 1
      documentation/manual/en/manual-print1.xml.in
  4. 0 5
      documentation/manual/en/manual.xml.in
  5. 0 9
      documentation/manual/en/module_specs/Zend_Gdata-Introduction.xml
  6. 0 685
      documentation/manual/en/module_specs/Zend_Gdata_YouTube.xml
  7. 0 7
      documentation/manual/ja/module_specs/Zend_Gdata-Introduction.xml
  8. 0 638
      documentation/manual/ja/module_specs/Zend_Gdata_YouTube.xml
  9. 0 876
      library/Zend/Gdata/YouTube.php
  10. 0 232
      library/Zend/Gdata/YouTube/ActivityEntry.php
  11. 0 66
      library/Zend/Gdata/YouTube/ActivityFeed.php
  12. 0 59
      library/Zend/Gdata/YouTube/CommentEntry.php
  13. 0 66
      library/Zend/Gdata/YouTube/CommentFeed.php
  14. 0 136
      library/Zend/Gdata/YouTube/ContactEntry.php
  15. 0 68
      library/Zend/Gdata/YouTube/ContactFeed.php
  16. 0 51
      library/Zend/Gdata/YouTube/Extension/AboutMe.php
  17. 0 51
      library/Zend/Gdata/YouTube/Extension/Age.php
  18. 0 51
      library/Zend/Gdata/YouTube/Extension/Books.php
  19. 0 51
      library/Zend/Gdata/YouTube/Extension/Company.php
  20. 0 133
      library/Zend/Gdata/YouTube/Extension/Control.php
  21. 0 51
      library/Zend/Gdata/YouTube/Extension/CountHint.php
  22. 0 51
      library/Zend/Gdata/YouTube/Extension/Description.php
  23. 0 126
      library/Zend/Gdata/YouTube/Extension/Duration.php
  24. 0 51
      library/Zend/Gdata/YouTube/Extension/FirstName.php
  25. 0 51
      library/Zend/Gdata/YouTube/Extension/Gender.php
  26. 0 51
      library/Zend/Gdata/YouTube/Extension/Hobbies.php
  27. 0 51
      library/Zend/Gdata/YouTube/Extension/Hometown.php
  28. 0 51
      library/Zend/Gdata/YouTube/Extension/LastName.php
  29. 0 133
      library/Zend/Gdata/YouTube/Extension/Link.php
  30. 0 51
      library/Zend/Gdata/YouTube/Extension/Location.php
  31. 0 120
      library/Zend/Gdata/YouTube/Extension/MediaContent.php
  32. 0 189
      library/Zend/Gdata/YouTube/Extension/MediaCredit.php
  33. 0 336
      library/Zend/Gdata/YouTube/Extension/MediaGroup.php
  34. 0 150
      library/Zend/Gdata/YouTube/Extension/MediaRating.php
  35. 0 51
      library/Zend/Gdata/YouTube/Extension/Movies.php
  36. 0 51
      library/Zend/Gdata/YouTube/Extension/Music.php
  37. 0 54
      library/Zend/Gdata/YouTube/Extension/NoEmbed.php
  38. 0 51
      library/Zend/Gdata/YouTube/Extension/Occupation.php
  39. 0 51
      library/Zend/Gdata/YouTube/Extension/PlaylistId.php
  40. 0 51
      library/Zend/Gdata/YouTube/Extension/PlaylistTitle.php
  41. 0 90
      library/Zend/Gdata/YouTube/Extension/Position.php
  42. 0 81
      library/Zend/Gdata/YouTube/Extension/Private.php
  43. 0 51
      library/Zend/Gdata/YouTube/Extension/QueryString.php
  44. 0 124
      library/Zend/Gdata/YouTube/Extension/Racy.php
  45. 0 51
      library/Zend/Gdata/YouTube/Extension/Recorded.php
  46. 0 51
      library/Zend/Gdata/YouTube/Extension/Relationship.php
  47. 0 51
      library/Zend/Gdata/YouTube/Extension/ReleaseDate.php
  48. 0 51
      library/Zend/Gdata/YouTube/Extension/School.php
  49. 0 193
      library/Zend/Gdata/YouTube/Extension/State.php
  50. 0 309
      library/Zend/Gdata/YouTube/Extension/Statistics.php
  51. 0 51
      library/Zend/Gdata/YouTube/Extension/Status.php
  52. 0 70
      library/Zend/Gdata/YouTube/Extension/Token.php
  53. 0 51
      library/Zend/Gdata/YouTube/Extension/Uploaded.php
  54. 0 51
      library/Zend/Gdata/YouTube/Extension/Username.php
  55. 0 51
      library/Zend/Gdata/YouTube/Extension/VideoId.php
  56. 0 281
      library/Zend/Gdata/YouTube/InboxEntry.php
  57. 0 68
      library/Zend/Gdata/YouTube/InboxFeed.php
  58. 0 81
      library/Zend/Gdata/YouTube/MediaEntry.php
  59. 0 300
      library/Zend/Gdata/YouTube/PlaylistListEntry.php
  60. 0 68
      library/Zend/Gdata/YouTube/PlaylistListFeed.php
  61. 0 132
      library/Zend/Gdata/YouTube/PlaylistVideoEntry.php
  62. 0 68
      library/Zend/Gdata/YouTube/PlaylistVideoFeed.php
  63. 0 446
      library/Zend/Gdata/YouTube/SubscriptionEntry.php
  64. 0 68
      library/Zend/Gdata/YouTube/SubscriptionFeed.php
  65. 0 1041
      library/Zend/Gdata/YouTube/UserProfileEntry.php
  66. 0 1095
      library/Zend/Gdata/YouTube/VideoEntry.php
  67. 0 65
      library/Zend/Gdata/YouTube/VideoFeed.php
  68. 0 540
      library/Zend/Gdata/YouTube/VideoQuery.php
  69. 0 21
      tests/TestConfiguration.php.dist
  70. 0 38
      tests/Zend/Gdata/AllTests.php
  71. 0 153
      tests/Zend/Gdata/YouTube/ActivityEntryTest.php
  72. 0 149
      tests/Zend/Gdata/YouTube/ActivityFeedTest.php
  73. 0 107
      tests/Zend/Gdata/YouTube/CommentEntryTest.php
  74. 0 109
      tests/Zend/Gdata/YouTube/CommentFeedTest.php
  75. 0 109
      tests/Zend/Gdata/YouTube/ContactEntryTest.php
  76. 0 109
      tests/Zend/Gdata/YouTube/ContactFeedTest.php
  77. 0 217
      tests/Zend/Gdata/YouTube/InboxEntryTest.php
  78. 0 182
      tests/Zend/Gdata/YouTube/InboxFeedTest.php
  79. 0 239
      tests/Zend/Gdata/YouTube/PlaylistListEntryTest.php
  80. 0 171
      tests/Zend/Gdata/YouTube/PlaylistListFeedTest.php
  81. 0 356
      tests/Zend/Gdata/YouTube/PlaylistVideoEntryTest.php
  82. 0 112
      tests/Zend/Gdata/YouTube/PlaylistVideoFeedTest.php
  83. 0 332
      tests/Zend/Gdata/YouTube/SubscriptionEntryTest.php
  84. 0 178
      tests/Zend/Gdata/YouTube/SubscriptionFeedTest.php
  85. 0 253
      tests/Zend/Gdata/YouTube/UserProfileEntryTest.php
  86. 0 767
      tests/Zend/Gdata/YouTube/VideoEntryTest.php
  87. 0 109
      tests/Zend/Gdata/YouTube/VideoFeedTest.php
  88. 0 277
      tests/Zend/Gdata/YouTube/VideoQueryTest.php
  89. 0 23
      tests/Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml
  90. 0 47
      tests/Zend/Gdata/YouTube/_files/ActivityFeedDataSample1.xml
  91. 0 20
      tests/Zend/Gdata/YouTube/_files/CommentEntryDataSample1.xml
  92. 0 112
      tests/Zend/Gdata/YouTube/_files/CommentFeedDataSample1.xml
  93. 0 26
      tests/Zend/Gdata/YouTube/_files/ContactEntryDataSample1.xml
  94. 0 51
      tests/Zend/Gdata/YouTube/_files/ContactFeedDataSample1.xml
  95. 0 1
      tests/Zend/Gdata/YouTube/_files/FormUploadTokenResponseSample.xml
  96. 0 82
      tests/Zend/Gdata/YouTube/_files/InboxEntryDataSample1.xml
  97. 0 88
      tests/Zend/Gdata/YouTube/_files/InboxEntryDataSampleV2.xml
  98. 0 107
      tests/Zend/Gdata/YouTube/_files/InboxFeedDataSample1.xml
  99. 0 119
      tests/Zend/Gdata/YouTube/_files/InboxFeedDataSampleV2.xml
  100. 0 30
      tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSample1.xml

+ 0 - 8
documentation/manual/de/module_specs/Zend_Gdata-Introduction.xml

@@ -61,14 +61,6 @@
 
             <listitem>
                 <para>
-                    <link linkend="zend.gdata.youtube">YouTube</link> bietet die Möglichkeit Videos,
-                    Kommentare, Favoriten, Einschreibungen, Benutzerprofile und vieles mehr zu
-                    Suchen und zu Empfangen.
-                </para>
-            </listitem>
-
-            <listitem>
-                <para>
                     <link linkend="zend.gdata.photos">Picasa Web Album</link> bietet eine online
                     Photo Sharing Anwendung.
                 </para>

+ 0 - 703
documentation/manual/de/module_specs/Zend_Gdata_YouTube.xml

@@ -1,703 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 24249 -->
-<!-- Reviewed: no -->
-<sect1 id="zend.gdata.youtube">
-    <title>Verwenden der YouTube Daten API</title>
-
-    <para>
-        Die YouTube Daten <acronym>API</acronym> bietet einen Lese- und Schreibzugriff auf YouTube
-        Inhalte. Benutzer können nicht authentifizierte Anfragen zu Google Daten Feeds durchführen
-        um Feeds von populären Videos, Kommentare, öffentliche Informationen über YouTube
-        Benutzerprofilen, Benutzer PlayListen, Favoriten, Einschreibungen und so weiter zu erhalten.
-    </para>
-
-    <para>
-        Für weitere Informationen über die YouTube Daten <acronym>API</acronym> schauen Sie in die
-        offizielle <ulink
-            url="http://code.google.com/apis/youtube/developers_guide_php.html"><acronym>PHP</acronym>
-            Entwickler Dokumentation</ulink> auf code.google.com.
-    </para>
-
-    <sect2 id="zend.gdata.youtube.authentication">
-        <title>Authentifizierung</title>
-
-        <para>
-            Die YouTube Daten <acronym>API</acronym> erlaubt aktuell einen nur-lesenden Zugriff auf
-            öffentliche Daten, welcher keine Authentifizierung benötigt. Für alle schreibenden
-            Anfragen muß sich ein Benutzer entweder mit ClientLogin oder AuthSub authentifizieren.
-            Schauen Sie bitte in das <ulink
-                url="http://code.google.com/apis/youtube/developers_guide_php.html#Authentication">Kapitel
-                über Authentifizierung in der <acronym>PHP</acronym> Entwickler
-                Dokumentation</ulink> für weitere Details.
-        </para>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.developer_key">
-        <title>Entwickler Schlüssel und Client ID</title>
-
-        <para>
-            Ein Entwickler Schlüssel identifiziert den QouTube Entwickler der die
-            <acronym>API</acronym> Anfrage schickt. Eine Client ID identifiziert die Anwendung für
-            Logging und Debugging Zwecke. Schauen Sie bitte auf <ulink
-                url="http://code.google.com/apis/youtube/dashboard/">http://code.google.com/apis/youtube/dashboard/</ulink>
-            um einen Entwickler Schlüssel und eine Client ID zu erhalten. Das angefügte Beispiel
-            demonstriert wie der Entwickler Schlüssel und die Client ID an das <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube.html">Zend_Gdata_YouTube</ulink>
-            Service Pbjekt übergeben werden.
-        </para>
-
-        <example id="zend.gdata.youtube.developer_key.example">
-
-            <title>
-                Einen Entwicklerschlüssel und eine ClientID an Zend_Gdata_YouTube übergeben
-            </title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient,
-                             $applicationId,
-                             $clientId,
-                             $developerKey);
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.videos">
-        <title>Öffentliche Video Feeds empfangen</title>
-
-        <para>
-            Die YouTube Daten <acronym>API</acronym> bietet eine Vielzahl von Feeds die eine Liste
-            von Videos zurückgeben, wie zum Beispiel Standard Feeds, Abhängige Videos, Antworten auf
-            Videos, Videobewertungen, Benutzer Uploads, und Benutzer Favoriten. Zum Beispiel gibt
-            der Benutzer Upload Feed alle Videos zurück die von einem speziellen Benutzer
-            hochgeladen wurden. Sehen Sie in den <ulink
-                url="http://code.google.com/apis/youtube/reference.html#Video_Feeds">You Tube
-                <acronym>API</acronym> Referenz Guide</ulink> für eine detailierte Liste aller
-            vorhandenen Feeds.
-        </para>
-
-        <sect3 id="zend.gdata.youtube.videos.searching">
-            <title>Suchen nach Videos durch Metadaten</title>
-
-            <para>
-                Man kann eine Liste von Videos erhalten die einem speziellen Suchkriterium
-                entsprechen, indem die YouTubeQuery Klasse verwendet wird. Die folgende Abfrage
-                schaut nach Videos welche das Wort "Katze" in Ihren Metadaten enthalten, beginnend
-                mit dem 10ten Video und 20 Videos pro Seite anzeigt, sortiert nach der Anzahl der
-                Ansichten.
-            </para>
-
-            <example id="zend.gdata.youtube.videos.searching.example">
-                <title>Suchen nach Videos</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->videoQuery = 'cat';
-$query->startIndex = 10;
-$query->maxResults = 20;
-$query->orderBy = 'viewCount';
-
-echo $query->queryUrl . "\n";
-$videoFeed = $yt->getVideoFeed($query);
-
-foreach ($videoFeed as $videoEntry) {
-    echo "---------VIDEO----------\n";
-    echo "Titel: " . $videoEntry->mediaGroup->title->text . "\n";
-    echo "\nBeschreibung:\n";
-    echo $videoEntry->mediaGroup->description->text;
-    echo "\n\n\n";
-}
-]]></programlisting>
-            </example>
-
-            <para>
-                Für weitere Details über die verschiedenen Abfrageparameter, kann der <ulink
-                    url="http://code.google.com/apis/youtube/reference.html#Searching_for_videos">Referenz
-                    Guide</ulink> hilfreich sein. Die vorhandenen Hilfsfunktionen in <ulink
-                    url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoQuery.html">
-                    <classname>Zend_Gdata_YouTube_VideoQuery</classname></ulink> für jeden dieser
-                Parameter werden im <ulink
-                    url="http://code.google.com/apis/youtube/developers_guide_php.html#SearchingVideos">PHP
-                    Entwickler Guide</ulink> detailierter beschrieben.
-            </para>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.searchingcategories">
-            <title>Suchen nach Videos durch Kategorien und Tags/Schlüsselwörter</title>
-
-            <para>
-                Die Suche nach Videos in speziellen Kategorien wird durch die Erstellung einer
-                <ulink url="http://code.google.com/apis/youtube/reference.html#Category_Search">
-                speziell formatierten <acronym>URL</acronym></ulink> durchgeführt. Um, zum Beispiel,
-                nach Komödien-Videos zu suchen die das Schlüsselwort Hund enthalten:
-            </para>
-
-            <example id="zend.gdata.youtube.videos.searchingcategories.example">
-                <title>Suchen nach Videos in speziellen Kategorien</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->category = 'Comedy/Hund';
-
-echo $query->queryUrl . "\n";
-$videoFeed = $yt->getVideoFeed($query);
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.standard">
-            <title>Standard Feeds empfangen</title>
-
-            <para>
-                Die YouTube Daten <acronym>API</acronym> hat eine Anzahl an <ulink
-                    url="http://code.google.com/apis/youtube/reference.html#Standard_feeds">Standard
-                    Feeds</ulink>. Diese Standard Feeds können als <ulink
-                    url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoFeed.html">Zend_Gdata_YouTube_VideoFeed</ulink>
-                Objekte empfangen werden indem die spezifizierten <acronym>URL</acronym>s und die in
-                der <ulink
-                    url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube.html">Zend_Gdata_YouTube</ulink>
-                Klasse vordefinierten Konstanten (zum Beispiel
-                Zend_Gdata_YouTube::STANDARD_TOP_RATED_URI) oder die vordefinierten Hilfsmethoden
-                verwendet verwendet werden (siehe das Codebeispiel anbei).
-            </para>
-
-            <para>
-                Um die Top gereihten Videos zu erhalten kann die folgende Helfermethode verwendet
-                werden:
-            </para>
-
-            <example id="zend.gdata.youtube.videos.standard.example-1">
-                <title>Empfangen eines Standard Videofeeds</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getTopRatedVideoFeed();
-]]></programlisting>
-            </example>
-
-            <para>
-                Es gibt auch Abfrageparameter um eine Zeitperiode zu spezifizieren über die der
-                Standardfeed berechnet wird.
-            </para>
-
-            <para>
-                Um zum Beispiel die Top gereihten Videos von Heute zu erhalten:
-            </para>
-
-            <example id="zend.gdata.youtube.videos.standard.example-2">
-                <title>Verwenden von Zend_Gdata_YouTube_VideoQuery um Videos zu empfangen</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->setTime('today');
-$videoFeed = $yt->getTopRatedVideoFeed($query);
-]]></programlisting>
-            </example>
-
-            <para>
-                Alternativ kann man den Feed erhalten indem die <acronym>URL</acronym> verwendet
-                wird:
-            </para>
-
-            <example id="zend.gdata.youtube.videos.standard.example-3">
-                <title>Empfangen eines Video Feeds durch die URL</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$url = 'http://gdata.youtube.com/feeds/standardfeeds/top_rated?time=today'
-$videoFeed = $yt->getVideoFeed($url);
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.user">
-            <title>Videos erhalten die von einem Benutzer hochgeladen wurden</title>
-
-            <para>
-                Man kann eine Liste von Videos erhalten die von einem bestimmten Benutzer
-                hochgeladen wurden indem eine einfache Helfermethode verwendet wird. Dieses Beispiel
-                empfängt Videos die vom Benutzer 'liz' hochgeladen wurden.
-            </para>
-
-            <example id="zend.gdata.youtube.videos.user.example">
-                <title>
-                    Empfangen von Videos die von einem spezifischen Benutzer hochgeladen wurden
-                </title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getUserUploads('liz');
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.favorites">
-            <title>Videos empfangen die von einem Benutzer bevorzugt werden</title>
-
-            <para>
-                Man kann eine Liste von bevorzugten Videos eines Benutzer erhalten indem eine
-                einfache Helfermethode verwendet wird. Dieses Beispiel empfängt Videos die vom
-                Benutzer 'liz' bevorzugt werden.
-            </para>
-
-            <example id="zend.gdata.youtube.videos.favorites.example">
-                <title>Empfangen von den bevorzugten Videos eines Benutzers</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getUserFavorites('liz');
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.responses">
-            <title>Videobewertungen für ein Video erhalten</title>
-
-            <para>
-                Man kann eine Liste von Videobewertungen eines Videos erhalten indem eine einfache
-                Helfermethode verwendet wird. Dieses Beispiel empfängt Videobewertungen für ein
-                Video mit der ID 'abc123813abc'.
-            </para>
-
-            <example id="zend.gdata.youtube.videos.responses.example">
-                <title>Empfangen eines Feeds von Video Antworten</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getVideoResponseFeed('abc123813abc');
-]]></programlisting>
-            </example>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.comments">
-        <title>Videokommentare erhalten</title>
-
-        <para>
-            Die Kommentare für jedes YouTube Video können auf unterschiedlichen Wegen empfangen
-            werden. Um die Kommentare für das Video mit der ID 'abc123813abc' zu empfangen kann der
-            folgende Code verwendet werden:
-        </para>
-
-        <example id="zend.gdata.youtube.videos.comments.example-1">
-            <title>Empfangen eines Feeds von Videokommentaren von einer Video ID</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$commentFeed = $yt->getVideoCommentFeed('abc123813abc');
-
-foreach ($commentFeed as $commentEntry) {
-    echo $commentEntry->title->text . "\n";
-    echo $commentEntry->content->text . "\n\n\n";
-}
-]]></programlisting>
-        </example>
-
-        <para>
-            Kommentare können für ein Video auch empfangen werden wenn man eine Kopie des <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            Objektes hat:
-        </para>
-
-        <example id="zend.gdata.youtube.videos.comments.example-2">
-            <title>
-                Empfangen eines Feeds von Videokommentaren von einem Zend_Gdata_YouTube_VideoEntry
-            </title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoEntry = $yt->getVideoEntry('abc123813abc');
-// Die ID des Videos in diesem Beispiel ist unbekannt, aber wir haben die URL
-$commentFeed = $yt->getVideoCommentFeed(null,
-                                        $videoEntry->comments->href);
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.playlists">
-        <title>PlayList Feeds erhalten</title>
-
-        <para>
-            Die YouTube Daten <acronym>API</acronym> bietet Informationen über Benutzer, inklusive
-            Profile, PlayListen, Einschreibungen, und weitere.
-        </para>
-
-        <sect3 id="zend.gdata.youtube.playlists.user">
-            <title>Die PlayListen eines Benutzer erhalten</title>
-
-            <para>
-                Die Bibliothek bietet eine Helfermethode um die PlayListen, die einem angegebenen
-                Benutzer zugeordnet sind, zu erhalten. Um die PlayListen des Benutzers 'liz' zu
-                erhalten kann der folgende Code verwendet werden:
-            </para>
-
-            <example id="zend.gdata.youtube.playlists.user.example">
-                <title>Empfangen von Playlisten eines Benutzers</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$playlistListFeed = $yt->getPlaylistListFeed('liz');
-
-foreach ($playlistListFeed as $playlistEntry) {
-    echo $playlistEntry->title->text . "\n";
-    echo $playlistEntry->description->text . "\n";
-    echo $playlistEntry->getPlaylistVideoFeedUrl() . "\n\n\n";
-}
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.playlists.special">
-            <title>Eine spezielle PlayListe erhalten</title>
-
-            <para>
-                Die Bibliothek bietet eine Helfermethode um Videos zu erhalten die mit einer
-                gegebenen PlayListe assoziiert sind. Um die PlayListe für einen speziellen PlayList
-                Eintrag zu erhalten kann der folgende Code verwendet werden:
-            </para>
-
-            <example id="zend.gdata.youtube.playlists.special.example">
-                <title>Empfangen von speziellen Playlisten</title>
-
-                <programlisting language="php"><![CDATA[
-$feedUrl = $playlistEntry->getPlaylistVideoFeedUrl();
-$playlistVideoFeed = $yt->getPlaylistVideoFeed($feedUrl);
-]]></programlisting>
-            </example>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.subscriptions">
-        <title>Eine Liste von Einschreibungen eines Benutzers erhalten</title>
-
-        <para>
-            Ein Benutzer kann verschiedene Arten von Einschreibungen besitzen: Kanal
-            Einschreibungen, Tag Einschreibungen, oder Favoriten Einschreibungen. Ein <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_SubscriptionEntry.html">Zend_Gdata_YouTube_SubscriptionEntry</ulink>
-            wird verwendet um individuelle Einschreibungen zu repräsentieren.
-        </para>
-
-        <para>
-            Um alle Einschreibungen für den Benutzer 'liz' zu erhalten kann der folgende Code
-            verwendet werden:
-        </para>
-
-        <example id="zend.gdata.youtube.subscriptions.example">
-            <title>Empfangen aller Einschreibungen eines Benutzers</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$subscriptionFeed = $yt->getSubscriptionFeed('liz');
-
-foreach ($subscriptionFeed as $subscriptionEntry) {
-    echo $subscriptionEntry->title->text . "\n";
-}
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.profile">
-        <title>Ein Benutzerprofil erhalten</title>
-
-        <para>
-            Die öffentlichen Profil Informationen kann man für jeden YouTube Benutzer erhalten. Um
-            das Profil für den Benutzer 'liz' zu erhalten kann der folgende Code verwendet werden:
-        </para>
-
-        <example id="zend.gdata.youtube.profile.example">
-            <title>Empfangen des Profils eines Benutzers</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$userProfile = $yt->getUserProfile('liz');
-echo "Benutzername: " . $userProfile->username->text . "\n";
-echo "Alter: " . $userProfile->age->text . "\n";
-echo "Heimatstadt: " . $userProfile->hometown->text . "\n";
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.uploads">
-        <title>Videos auf YouTube hochladen</title>
-
-        <para>
-            Stellen Sie sicher das Sie die Diagramme im <ulink
-                url="http://code.google.com/apis/youtube/developers_guide_protocol.html#Process_Flows_for_Uploading_Videos">Protokoll
-                Guide</ulink> auf code.google.com für eine Übersicht des Upload Prozesses betrachtet
-            haben. Das Hochladen von Videos kann auf 2 Wegen durchgeführt werden: Entweder durch das
-            direkte Hochladen des Videos oder durch das Senden der Video Meta-Daten und indem der
-            Benutzer das Video über ein <acronym>HTML</acronym> Formular hochlädt.
-        </para>
-
-        <para>
-            Um ein Video direkt hochzuladen, muß zuerst ein neues <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            Objekt erstellt und einige benötigte Meta-Daten spezifiziert werden. Das folgende
-            Beispiel zeigt das Hochladen des Quicktime Videos "mytestmovie.mov" auf YouTube mit den
-            folgenden Eigenschaften:
-        </para>
-
-        <table id="zend.gdata.youtube.uploads.metadata">
-            <title>Metadaten die im folgenden Code-Beispiel verwendet werden</title>
-
-            <tgroup cols="2" align="left" colsep="1" rowsep="1">
-                <thead>
-                    <row>
-                        <entry>Eigenschaft</entry>
-                        <entry>Wert</entry>
-                    </row>
-                </thead>
-
-                <tbody>
-                    <row>
-                        <entry>Title</entry>
-                        <entry>My Test Movie</entry>
-                    </row>
-
-                    <row>
-                        <entry>Category</entry>
-                        <entry>Autos</entry>
-                    </row>
-
-                    <row>
-                        <entry>Keywords</entry>
-                        <entry>cars, funny</entry>
-                    </row>
-
-                    <row>
-                        <entry>Description</entry>
-                        <entry>My description</entry>
-                    </row>
-
-                    <row>
-                        <entry>Filename</entry>
-                        <entry>mytestmovie.mov</entry>
-                    </row>
-
-                    <row>
-                        <entry>File <acronym>MIME</acronym> type</entry>
-                        <entry>video/quicktime</entry>
-                    </row>
-
-                    <row>
-                        <entry>Video private?</entry>
-                        <entry><constant>FALSE</constant></entry>
-                    </row>
-
-                    <row>
-                        <entry>Video location</entry>
-                        <entry>37, -122 (lat, long)</entry>
-                    </row>
-
-                    <row>
-                        <entry>Developer Tags</entry>
-                        <entry>mydevelopertag, anotherdevelopertag</entry>
-                    </row>
-                </tbody>
-            </tgroup>
-        </table>
-
-        <para>
-            Der folgende Code erzeugt einen leeren <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            der Hochgeladen werden kann. Ein <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_App_MediaFileSource.html">Zend_Gdata_App_MediaFileSource</ulink>
-            wird dann verwendet um die aktuelle Video Datei zu speichern. Unter der Hand wird ein
-            <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_Extension_MediaGroup.html">Zend_Gdata_YouTube_Extension_MediaGroup</ulink>
-            Objekt verwendet um alle Metadaten des Videos zu speichern. Die anbei beschriebenen
-            Helfermethoden erlauben es die Metadaten des Videos zu setzen ohne das man sich um das
-            Medien Gruppen Objekt kümmern muß. $uploadUrl ist der Ort an den der neue Eintrag
-            gepostet wird. Er kann entweder durch $userName des aktuell authentifizierten Benutzers
-            spezifiziert werden, oder, alternativ indem einfach der String 'default' verwendet wird
-            um auf den aktuell authentifizierten Benutzer zu verweisen.
-        </para>
-
-        <example id="zend.gdata.youtube.uploads.example">
-            <title>Ein Video hochladen</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient);
-$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
-
-$filesource = $yt->newMediaFileSource('mytestmovie.mov');
-$filesource->setContentType('video/quicktime');
-$filesource->setSlug('mytestmovie.mov');
-
-$myVideoEntry->setMediaSource($filesource);
-
-$myVideoEntry->setVideoTitle('My Test Movie');
-$myVideoEntry->setVideoDescription('My Test Movie');
-// Beachte das category eine gültige YouTube Kategorie sein muß !
-$myVideoEntry->setVideoCategory('Comedy');
-
-// Setzt Keywords, beachte das es ein Komma getrennter String ist
-// und das keines der Schlüsselwörter ein Leerzeichen enthalten darf
-$myVideoEntry->SetVideoTags('cars, funny');
-
-// Optional Entwickler Tags setzen
-$myVideoEntry->setVideoDeveloperTags(array('mydevelopertag',
-                                           'anotherdevelopertag'));
-
-// Optional den Ort des Videos setzen
-$yt->registerPackage('Zend_Gdata_Geo');
-$yt->registerPackage('Zend_Gdata_Geo_Extension');
-$where = $yt->newGeoRssWhere();
-$position = $yt->newGmlPos('37.0 -122.0');
-$where->point = $yt->newGmlPoint($position);
-$myVideoEntry->setWhere($where);
-
-// URI hochladen für den aktuell authentifizierten Benutzer
-$uploadUrl =
-    'http://uploads.gdata.youtube.com/feeds/users/default/uploads';
-
-// Versuch das Video hochzuladen, eine Zend_Gdata_App_HttpException fangen wenn
-// Sie vorhanden ist oder nur eine reguläre Zend_Gdata_App_Exception
-
-try {
-    $newEntry = $yt->insertEntry($myVideoEntry,
-                                 $uploadUrl,
-                                 'Zend_Gdata_YouTube_VideoEntry');
-} catch (Zend_Gdata_App_HttpException $httpException) {
-    echo $httpException->getRawResponseBody();
-} catch (Zend_Gdata_App_Exception $e) {
-    echo $e->getMessage();
-}
-]]></programlisting>
-        </example>
-
-        <para>
-            Um ein Video als privat hochzuladen muß einfach $myVideoEntry->setVideoPrivate();
-            verwendet werden; bevor das Hochladen durchgeführt wird. $videoEntry->isVideoPrivate()
-            kann verwendet werden um zu prüfen ob ein Video Eintrag privat ist oder nicht.
-        </para>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.uploads.browser">
-        <title>Browser-basierender Upload</title>
-
-        <para>
-            Browser-basierendes hochladen wird fast auf die gleiche Weise durchgeführt wie direktes
-            Hochladen, ausser das man kein <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_App_MediaFileSource.html">Zend_Gdata_App_MediaFileSource</ulink>
-            Objekt an den <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            anhängt den man erstellt. Stattdessen überträgt man einfach alle Metadaten des Videos um
-            ein Token Element zurück zu erhalten welches verwendet werden kann um ein
-            <acronym>HTML</acronym> Upload Formular zu erstellen.
-        </para>
-
-        <example id="zend.gdata.youtube.uploads.browser.example-1">
-            <title>Browser-basierender Upload</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient);
-
-$myVideoEntry= new Zend_Gdata_YouTube_VideoEntry();
-$myVideoEntry->setVideoTitle('My Test Movie');
-$myVideoEntry->setVideoDescription('My Test Movie');
-
-// Beachte das die Kategorie eine gültige YouTube Kategorie sein muß !
-$myVideoEntry->setVideoCategory('Comedy');
-$myVideoEntry->SetVideoTags('cars, funny');
-
-$tokenHandlerUrl = 'http://gdata.youtube.com/action/GetUploadToken';
-$tokenArray = $yt->getFormUploadToken($myVideoEntry, $tokenHandlerUrl);
-$tokenValue = $tokenArray['token'];
-$postUrl = $tokenArray['url'];
-]]></programlisting>
-        </example>
-
-        <para>
-            Der obige Code gibt einen Link und ein Token aus das verwendet wird um ein
-            <acronym>HTML</acronym> Formular zu erstellen und im Browser des Benutzers anzuzeigen.
-            Ein einfaches Beispielformular wird unten gezeigt mit $tokenValue welches den Inhalt des
-            zurückgegebenen Token Elements darstellt, welches wie gezeigt, oben von $myVideoEntry
-            empfangen wird. Damit der Benutzer, nachdem das Formular übermittelt wurde, auf die
-            Website umgeleitet wird, muß ein $nextUrl Parameter an die $postUrl von oben angehängt
-            werden, was auf die gleiche Weise funktioniert wie der $next Parameter eines AuthSub
-            Links. Der einzige Unterschied ist hier das, statt eines einmal zu verwendenden Tokens,
-            ein Status und eine ID Variable in der <acronym>URL</acronym> zurückgegeben werden.
-        </para>
-
-        <example id="zend.gdata.youtube.uploads.browser.example-2">
-            <title>Browser-basierender Upload: Erstellen des HTML Formulars</title>
-
-            <programlisting language="php"><![CDATA[
-// Platzieren um den Benutzer nach dem Upload umzuleiten
-$nextUrl = 'http://mysite.com/youtube_uploads';
-
-$form = '<form action="'. $postUrl .'?nexturl='. $nextUrl .
-        '" method="post" enctype="multipart/form-data">'.
-        '<input name="file" type="file"/>'.
-        '<input name="token" type="hidden" value="'. $tokenValue .'"/>'.
-        '<input value="Video Daten hochladen" type="submit" />'.
-        '</form>';
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.uploads.status">
-        <title>Den Upload Status prüfen</title>
-
-        <para>
-             Nachdem ein Video hochgeladen wurde, wird es im Upload Feed des authentifizierten
-             Benutzer unmittelbar sichtbar sein. Trotzdem wird es auf der Site nicht öffentlich sein
-             solange es nicht bearbeitet wurde. Videos die ausgeschlossen oder nicht erfolgreich
-             hochgeladen wurden werden auch nur im Upload Feed des authentifizierten Benutzers
-             sichtbar sein. Der folgende Code prüft den Status eines <ulink
-                 url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-             um zu sehen ob er jetzt noch nicht live ist oder ob er nicht akzeptiert wurde.
-        </para>
-
-        <example id="zend.gdata.youtube.uploads.status.example">
-            <title>Den Status von Video Uploads checken</title>
-
-            <programlisting language="php"><![CDATA[
-try {
-    $control = $videoEntry->getControl();
-} catch (Zend_Gdata_App_Exception $e) {
-    echo $e->getMessage();
-}
-
-if ($control instanceof Zend_Gdata_App_Extension_Control) {
-    if ($control->getDraft() != null &&
-        $control->getDraft()->getText() == 'yes') {
-        $state = $videoEntry->getVideoState();
-
-        if ($state instanceof Zend_Gdata_YouTube_Extension_State) {
-            print 'Upload Status: '
-                  . $state->getName()
-                  .' '. $state->getText();
-        } else {
-            print 'Die Status Informationen des Videos konnten bis jetzt nicht'
-                . ' empfangen werden. Bitte versuchen Sie es etwas später'
-                . ' nochmals.\n";
-        }
-    }
-}
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.other">
-        <title>Andere Funktionen</title>
-
-        <para>
-            Zusätzlich zur oben beschriebenen Funktionalität, enthält die YouTube
-            <acronym>API</acronym> viele andere Funktionen die es erlauben Video Metadaten zu
-            verändern, Video Einträge zu löschen und den kompletten Bereich an Community Features
-            der Site zu verwenden. Einige der Community Features die durch die
-            <acronym>API</acronym> verändert werden können enthalten: Ratings, Kommentare,
-            Playlisten, Einschreibungen, Benutzer Profile, Kontakte und Nachrichten.
-        </para>
-
-        <para>
-            Bitte schauen Sie in die komplette Dokumentation die im
-            <ulink url="http://code.google.com/apis/youtube/developers_guide_php.html">PHP
-                Entwickler Guide</ulink> auf code.google.com zu finden ist.
-        </para>
-    </sect2>
-</sect1>

+ 0 - 1
documentation/manual/en/manual-print1.xml.in

@@ -243,7 +243,6 @@
         <xi:include href="module_specs/Zend_Gdata_Spreadsheets.xml" />
         <xi:include href="module_specs/Zend_Gdata_Gapps.xml" />
         <xi:include href="module_specs/Zend_Gdata_Photos.xml" />
-        <xi:include href="module_specs/Zend_Gdata_YouTube.xml" />
         <xi:include href="module_specs/Zend_Gdata_Exception.xml" />
     </chapter>
 

+ 0 - 5
documentation/manual/en/manual.xml.in

@@ -1091,11 +1091,6 @@
                     <xi:include href="../en/module_specs/Zend_Gdata_Photos.xml" />
                 </xi:fallback>
             </xi:include>
-            <xi:include href="module_specs/Zend_Gdata_YouTube.xml">
-                <xi:fallback>
-                    <xi:include href="../en/module_specs/Zend_Gdata_YouTube.xml" />
-                </xi:fallback>
-            </xi:include>
             <xi:include href="module_specs/Zend_Gdata_Exception.xml">
                 <xi:fallback>
                     <xi:include href="../en/module_specs/Zend_Gdata_Exception.xml" />

+ 0 - 9
documentation/manual/en/module_specs/Zend_Gdata-Introduction.xml

@@ -60,15 +60,6 @@
 
             <listitem>
                 <para>
-                    <link linkend="zend.gdata.youtube">YouTube</link>
-                    provides the ability to search and retrieve videos,
-                    comments, favorites, subscriptions, user profiles
-                    and more.
-                </para>
-            </listitem>
-
-            <listitem>
-                <para>
                     <link linkend="zend.gdata.photos">Picasa Web Albums</link>
                     provides an online photo sharing application.
                 </para>

+ 0 - 685
documentation/manual/en/module_specs/Zend_Gdata_YouTube.xml

@@ -1,685 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Reviewed: no -->
-<sect1 id="zend.gdata.youtube">
-    <title>Using the YouTube Data API</title>
-
-    <para>
-        The YouTube Data <acronym>API</acronym> offers read and write access to YouTube's content.
-        Users can perform unauthenticated requests to Google Data feeds to
-        retrieve feeds of popular videos, comments, public information about
-        YouTube user profiles, user playlists, favorites, subscriptions and so on.
-    </para>
-
-    <para>
-        For more information on the YouTube Data <acronym>API</acronym>, please refer
-        to the official <ulink
-            url="http://code.google.com/apis/youtube/developers_guide_php.html"><acronym>PHP</acronym>
-            Developer's Guide</ulink> on code.google.com.
-    </para>
-
-    <sect2 id="zend.gdata.youtube.authentication">
-        <title>Authentication</title>
-
-        <para>
-            The YouTube Data <acronym>API</acronym> allows read-only access to public data, which
-            does not require authentication. For any write requests, a user
-            needs to authenticate either using ClientLogin or AuthSub authentication. Please refer
-            to the <ulink
-                url="http://code.google.com/apis/youtube/developers_guide_php.html#Authentication">Authentication
-                section in the <acronym>PHP</acronym> Developer's Guide</ulink> for more detail.
-        </para>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.developer_key">
-        <title>Developer Keys and Client ID</title>
-
-        <para>
-            A developer key identifies the YouTube developer that is submitting
-            an <acronym>API</acronym> request. A client ID identifies your application for logging
-            and debugging purposes. Please visit <ulink
-                url="http://code.google.com/apis/youtube/dashboard/">http://code.google.com/apis/youtube/dashboard/</ulink>
-            to obtain a developer key and client ID. The example below demonstrates how to pass the
-            developer key and client ID to the <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube.html">Zend_Gdata_YouTube</ulink>
-            service object.
-        </para>
-
-        <example id="zend.gdata.youtube.developer_key.example">
-            <title>Passing a Developer Key and ClientID to Zend_Gdata_YouTube</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient,
-                             $applicationId,
-                             $clientId,
-                             $developerKey);
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.videos">
-        <title>Retrieving public video feeds</title>
-
-        <para>
-            The YouTube Data <acronym>API</acronym> provides numerous feeds that return a list of
-            videos, such as standard feeds, related videos, video responses,
-            user's uploads, and user's favorites. For example, the
-            user's uploads feed returns all videos uploaded by a specific user. See the <ulink
-                url="http://code.google.com/apis/youtube/reference.html#Video_Feeds">YouTube
-                <acronym>API</acronym> reference guide</ulink> for a detailed list of available
-            feeds.
-        </para>
-
-        <sect3 id="zend.gdata.youtube.videos.searching">
-            <title>Searching for videos by metadata</title>
-
-            <para>
-                You can retrieve a list of videos that match specified
-                search criteria, using the YouTubeQuery class. The following query
-                looks for videos which contain the word "cat" in their
-                metadata, starting with the 10th video and displaying 20
-                videos per page, ordered by the view count.
-            </para>
-
-            <example id="zend.gdata.youtube.videos.searching.example">
-                <title>Searching for videos</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->videoQuery = 'cat';
-$query->startIndex = 10;
-$query->maxResults = 20;
-$query->orderBy = 'viewCount';
-
-echo $query->queryUrl . "\n";
-$videoFeed = $yt->getVideoFeed($query);
-
-foreach ($videoFeed as $videoEntry) {
-    echo "---------VIDEO----------\n";
-    echo "Title: " . $videoEntry->getVideoTitle() . "\n";
-    echo "\nDescription:\n";
-    echo $videoEntry->getVideoDescription();
-    echo "\n\n\n";
-}
-]]></programlisting>
-            </example>
-
-            <para>
-                For more details on the different query parameters, please refer to the <ulink
-                    url="http://code.google.com/apis/youtube/reference.html#Searching_for_videos">
-                    Reference Guide</ulink>. The available helper functions in <ulink
-                    url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoQuery.html"><classname>Zend_Gdata_YouTube_VideoQuery</classname></ulink>
-                for each of these parameters are described in more detail in the <ulink
-                    url="http://code.google.com/apis/youtube/developers_guide_php.html#SearchingVideos">PHP
-                    Developer's Guide</ulink>.
-            </para>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.searchingcategories">
-            <title>Searching for videos by categories and tags/keywords</title>
-
-            <para>
-                Searching for videos in specific categories is done by generating a <ulink
-                    url="http://code.google.com/apis/youtube/reference.html#Category_search">specially
-                    formatted <acronym>URL</acronym></ulink>. For example, to search for
-                comedy videos which contain the keyword dog:
-            </para>
-
-            <example id="zend.gdata.youtube.videos.searchingcategories.example">
-                <title>Searching for videos in specific categories</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->category = 'Comedy/dog';
-
-echo $query->queryUrl . "\n";
-$videoFeed = $yt->getVideoFeed($query);
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.standard">
-            <title>Retrieving standard feeds</title>
-
-            <para>
-                The YouTube Data <acronym>API</acronym> has a number of <ulink
-                    url="http://code.google.com/apis/youtube/reference.html#Standard_feeds">standard
-                    feeds</ulink>. These standard feeds can be retrieved as <ulink
-                    url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoFeed.html">Zend_Gdata_YouTube_VideoFeed</ulink>
-                objects using the specified <acronym>URL</acronym>s, using the predefined constants
-                within the <ulink
-                    url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube.html">Zend_Gdata_YouTube</ulink>
-                class (Zend_Gdata_YouTube::STANDARD_TOP_RATED_URI for example) or
-                using the predefined helper methods (see code listing below).
-            </para>
-
-            <para>
-                To retrieve the top rated videos using the helper method:
-            </para>
-
-            <example id="zend.gdata.youtube.videos.standard.example-1">
-                <title>Retrieving a standard video feed</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getTopRatedVideoFeed();
-]]></programlisting>
-            </example>
-
-            <para>
-                There are also query parameters to specify the time period
-                over which the standard feed is computed.
-            </para>
-
-            <para>
-                For example, to retrieve the top rated videos for today:
-            </para>
-
-            <example id="zend.gdata.youtube.videos.standard.example-2">
-                <title>Using a Zend_Gdata_YouTube_VideoQuery to Retrieve Videos</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->setTime('today');
-$videoFeed = $yt->getTopRatedVideoFeed($query);
-]]></programlisting>
-            </example>
-
-            <para>
-                Alternatively, you could just retrieve the feed using the
-                <acronym>URL</acronym>:
-            </para>
-
-            <example id="zend.gdata.youtube.videos.standard.example-3">
-                <title>Retrieving a video feed by URL</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$url = 'http://gdata.youtube.com/feeds/standardfeeds/top_rated?time=today'
-$videoFeed = $yt->getVideoFeed($url);
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.user">
-            <title>Retrieving videos uploaded by a user</title>
-
-            <para>
-                You can retrieve a list of videos uploaded by a particular user
-                using a simple helper method. This example retrieves videos
-                uploaded by the user 'liz'.
-            </para>
-
-            <example id="zend.gdata.youtube.videos.user.example">
-                <title>Retrieving videos uploaded by a specific user</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getUserUploads('liz');
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.favorites">
-            <title>Retrieving videos favorited by a user</title>
-
-            <para>
-                You can retrieve a list of a user's favorite videos
-                using a simple helper method. This example retrieves videos
-                favorited by the user 'liz'.
-            </para>
-
-            <example id="zend.gdata.youtube.videos.favorites.example">
-                <title>Retrieving a user's favorite videos</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getUserFavorites('liz');
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.responses">
-            <title>Retrieving video responses for a video</title>
-
-            <para>
-                You can retrieve a list of a video's video responses
-                using a simple helper method. This example retrieves video
-                response for a video with the ID 'abc123813abc'.
-            </para>
-
-            <example id="zend.gdata.youtube.videos.responses.example">
-                <title>Retrieving a feed of video responses</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getVideoResponseFeed('abc123813abc');
-]]></programlisting>
-            </example>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.comments">
-        <title>Retrieving video comments</title>
-
-        <para>
-            The comments for each YouTube video can be retrieved in
-            several ways. To retrieve the comments for the video with
-            the ID 'abc123813abc', use the following code:
-        </para>
-
-        <example id="zend.gdata.youtube.videos.comments.example-1">
-            <title>Retrieving a feed of video comments from a video ID</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$commentFeed = $yt->getVideoCommentFeed('abc123813abc');
-
-foreach ($commentFeed as $commentEntry) {
-    echo $commentEntry->title->text . "\n";
-    echo $commentEntry->content->text . "\n\n\n";
-}
-]]></programlisting>
-        </example>
-
-        <para>
-            Comments can also be retrieved for a video if you have a copy of the <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            object:
-        </para>
-
-        <example id="zend.gdata.youtube.videos.comments.example-2">
-            <title>Retrieving a Feed of Video Comments from a Zend_Gdata_YouTube_VideoEntry</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoEntry = $yt->getVideoEntry('abc123813abc');
-// we don't know the video ID in this example, but we do have the URL
-$commentFeed = $yt->getVideoCommentFeed(null,
-                                        $videoEntry->comments->href);
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.playlists">
-        <title>Retrieving playlist feeds</title>
-
-        <para>
-          The YouTube Data <acronym>API</acronym> provides information about users, including
-            profiles, playlists, subscriptions, and more.
-        </para>
-
-        <sect3 id="zend.gdata.youtube.playlists.user">
-            <title>Retrieving the playlists of a user</title>
-
-            <para>
-                The library provides a helper method to retrieve
-                the playlists associated with a given user. To retrieve the
-                playlists for the user 'liz':
-            </para>
-
-            <example id="zend.gdata.youtube.playlists.user.example">
-                <title>Retrieving the playlists of a user</title>
-
-                <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$playlistListFeed = $yt->getPlaylistListFeed('liz');
-
-foreach ($playlistListFeed as $playlistEntry) {
-    echo $playlistEntry->title->text . "\n";
-    echo $playlistEntry->description->text . "\n";
-    echo $playlistEntry->getPlaylistVideoFeedUrl() . "\n\n\n";
-}
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.playlists.special">
-            <title>Retrieving a specific playlist</title>
-
-            <para>
-                The library provides a helper method to retrieve
-                the videos associated with a given playlist. To retrieve the
-                playlists for a specific playlist entry:
-            </para>
-
-            <example id="zend.gdata.youtube.playlists.special.example">
-                <title>Retrieving a specific playlist</title>
-
-                <programlisting language="php"><![CDATA[
-$feedUrl = $playlistEntry->getPlaylistVideoFeedUrl();
-$playlistVideoFeed = $yt->getPlaylistVideoFeed($feedUrl);
-]]></programlisting>
-            </example>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.subscriptions">
-        <title>Retrieving a list of a user's subscriptions</title>
-
-        <para>
-            A user can have several types of subscriptions: channel
-            subscription, tag subscription, or favorites subscription. A <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_SubscriptionEntry.html">Zend_Gdata_YouTube_SubscriptionEntry</ulink>
-            is used to represent individual subscriptions.
-        </para>
-
-        <para>
-            To retrieve all subscriptions for the user 'liz':
-        </para>
-
-        <example id="zend.gdata.youtube.subscriptions.example">
-            <title>Retrieving all subscriptions for a user</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$subscriptionFeed = $yt->getSubscriptionFeed('liz');
-
-foreach ($subscriptionFeed as $subscriptionEntry) {
-    echo $subscriptionEntry->title->text . "\n";
-}
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.profile">
-        <title>Retrieving a user's profile</title>
-
-        <para>
-            You can retrieve the public profile information
-            for any YouTube user. To retrieve the profile
-            for the user 'liz':
-        </para>
-
-        <example id="zend.gdata.youtube.profile.example">
-            <title>Retrieving a user's profile</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$userProfile = $yt->getUserProfile('liz');
-echo "username: " . $userProfile->username->text . "\n";
-echo "age: " . $userProfile->age->text . "\n";
-echo "hometown: " . $userProfile->hometown->text . "\n";
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.uploads">
-        <title>Uploading Videos to YouTube</title>
-
-        <para>
-            Please make sure to review the diagrams in the <ulink
-                url="http://code.google.com/apis/youtube/developers_guide_protocol.html#Process_Flows_for_Uploading_Videos">protocol
-                guide</ulink> on code.google.com for a high-level
-            overview of the upload process. Uploading videos can be done in one of
-            two ways: either by uploading the video directly or by sending just the video
-            meta-data and having a user upload the video through an <acronym>HTML</acronym> form.
-        </para>
-
-        <para>
-            In order to upload a video directly, you must first construct a new <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            object and specify some required meta-data. The following example shows uploading the
-            Quicktime video "mytestmovie.mov" to YouTube with the following properties:
-        </para>
-
-        <table id="zend.gdata.youtube.uploads.metadata">
-            <title>Metadata used in the code-sample below</title>
-
-            <tgroup cols="2" align="left" colsep="1" rowsep="1">
-                <thead>
-                    <row>
-                        <entry>Property</entry>
-                        <entry>Value</entry>
-                    </row>
-                </thead>
-
-                <tbody>
-                    <row>
-                        <entry>Title</entry>
-                        <entry>My Test Movie</entry>
-                    </row>
-
-                    <row>
-                        <entry>Category</entry>
-                        <entry>Autos</entry>
-                    </row>
-
-                    <row>
-                        <entry>Keywords</entry>
-                        <entry>cars, funny</entry>
-                    </row>
-
-                    <row>
-                        <entry>Description</entry>
-                        <entry>My description</entry>
-                    </row>
-
-                    <row>
-                        <entry>Filename</entry>
-                        <entry>mytestmovie.mov</entry>
-                    </row>
-
-                    <row>
-                        <entry>File <acronym>MIME</acronym> type</entry>
-                        <entry>video/quicktime</entry>
-                    </row>
-
-                    <row>
-                        <entry>Video private?</entry>
-                        <entry><constant>FALSE</constant></entry>
-                    </row>
-
-                    <row>
-                        <entry>Video location</entry>
-                        <entry>37, -122 (lat, long)</entry>
-                    </row>
-
-                    <row>
-                        <entry>Developer Tags</entry>
-                        <entry>mydevelopertag, anotherdevelopertag</entry>
-                    </row>
-                </tbody>
-            </tgroup>
-        </table>
-
-        <para>
-            The code below creates a blank <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            to be uploaded. A <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_App_MediaFileSource.html">Zend_Gdata_App_MediaFileSource</ulink>
-            object is then used to hold the actual video file. Under the hood, the <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_Extension_MediaGroup.html">Zend_Gdata_YouTube_Extension_MediaGroup</ulink>
-            object is used to hold all of the video's meta-data. Our helper methods detailed below
-            allow you to just set the video meta-data without having to worry about the media group
-            object. The $uploadUrl is the location where the new entry gets posted to.
-            This can be specified either with the $userName of the
-            currently authenticated user, or, alternatively, you can simply use the
-            string 'default' to refer to the currently authenticated user.
-        </para>
-
-        <example id="zend.gdata.youtube.uploads.example">
-            <title>Uploading a video</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient);
-$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
-
-$filesource = $yt->newMediaFileSource('mytestmovie.mov');
-$filesource->setContentType('video/quicktime');
-$filesource->setSlug('mytestmovie.mov');
-
-$myVideoEntry->setMediaSource($filesource);
-
-$myVideoEntry->setVideoTitle('My Test Movie');
-$myVideoEntry->setVideoDescription('My Test Movie');
-// Note that category must be a valid YouTube category !
-$myVideoEntry->setVideoCategory('Comedy');
-
-// Set keywords, note that this must be a comma separated string
-// and that each keyword cannot contain whitespace
-$myVideoEntry->SetVideoTags('cars, funny');
-
-// Optionally set some developer tags
-$myVideoEntry->setVideoDeveloperTags(array('mydevelopertag',
-                                           'anotherdevelopertag'));
-
-// Optionally set the video's location
-$yt->registerPackage('Zend_Gdata_Geo');
-$yt->registerPackage('Zend_Gdata_Geo_Extension');
-$where = $yt->newGeoRssWhere();
-$position = $yt->newGmlPos('37.0 -122.0');
-$where->point = $yt->newGmlPoint($position);
-$myVideoEntry->setWhere($where);
-
-// Upload URI for the currently authenticated user
-$uploadUrl =
-    'http://uploads.gdata.youtube.com/feeds/users/default/uploads';
-
-// Try to upload the video, catching a Zend_Gdata_App_HttpException
-// if availableor just a regular Zend_Gdata_App_Exception
-
-try {
-    $newEntry = $yt->insertEntry($myVideoEntry,
-                                 $uploadUrl,
-                                 'Zend_Gdata_YouTube_VideoEntry');
-} catch (Zend_Gdata_App_HttpException $httpException) {
-    echo $httpException->getRawResponseBody();
-} catch (Zend_Gdata_App_Exception $e) {
-    echo $e->getMessage();
-}
-]]></programlisting>
-        </example>
-
-        <para>
-            To upload a video as private, simply use: $myVideoEntry->setVideoPrivate(); prior to
-            performing the upload. $videoEntry->isVideoPrivate() can be used to check whether a
-            video entry is private or not.
-        </para>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.uploads.browser">
-        <title>Browser-based upload</title>
-
-        <para>
-            Browser-based uploading is performed almost identically to direct uploading,
-            except that you do not attach a <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_App_MediaFileSource.html">Zend_Gdata_App_MediaFileSource</ulink>
-            object to the <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            you are constructing. Instead you simply submit all of your video's meta-data to receive
-            back a token element which can be used to construct an <acronym>HTML</acronym> upload
-            form.
-        </para>
-
-        <example id="zend.gdata.youtube.uploads.browser.example-1">
-            <title>Browser-based upload</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient);
-
-$myVideoEntry= new Zend_Gdata_YouTube_VideoEntry();
-$myVideoEntry->setVideoTitle('My Test Movie');
-$myVideoEntry->setVideoDescription('My Test Movie');
-
-// Note that category must be a valid YouTube category
-$myVideoEntry->setVideoCategory('Comedy');
-$myVideoEntry->SetVideoTags('cars, funny');
-
-$tokenHandlerUrl = 'http://gdata.youtube.com/action/GetUploadToken';
-$tokenArray = $yt->getFormUploadToken($myVideoEntry, $tokenHandlerUrl);
-$tokenValue = $tokenArray['token'];
-$postUrl = $tokenArray['url'];
-]]></programlisting>
-        </example>
-
-        <para>
-            The above code prints out a link and a token that is used to construct an
-            <acronym>HTML</acronym> form to display in the user's browser. A simple example form is
-            shown below with $tokenValue representing the content of the returned token element,
-            as shown being retrieved from $myVideoEntry above. In order for the user
-            to be redirected to your website after submitting the form, make sure to
-            append a $nextUrl parameter to the $postUrl above, which functions in the
-            same way as the $next parameter of an AuthSub link. The only difference is
-            that here, instead of a single-use token, a status and an id variable are
-            returned in the <acronym>URL</acronym>.
-        </para>
-
-        <example id="zend.gdata.youtube.uploads.browser.example-2">
-            <title>Browser-based upload: Creating the HTML form</title>
-
-            <programlisting language="php"><![CDATA[
-// place to redirect user after upload
-$nextUrl = 'http://mysite.com/youtube_uploads';
-
-$form = '<form action="'. $postUrl .'?nexturl='. $nextUrl .
-        '" method="post" enctype="multipart/form-data">'.
-        '<input name="file" type="file"/>'.
-        '<input name="token" type="hidden" value="'. $tokenValue .'"/>'.
-        '<input value="Upload Video File" type="submit" />'.
-        '</form>';
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.uploads.status">
-        <title>Checking upload status</title>
-
-        <para>
-            After uploading a video, it will immediately be visible in an
-            authenticated user's uploads feed. However, it will not be public on
-            the site until it has been processed. Videos that have been rejected or
-            failed to upload successfully will also only be in the authenticated
-            user's uploads feed. The following code checks the status of a <ulink
-                url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            to see if it is not live yet or if it has been rejected.
-        </para>
-
-        <example id="zend.gdata.youtube.uploads.status.example">
-            <title>Checking video upload status</title>
-
-            <programlisting language="php"><![CDATA[
-try {
-    $control = $videoEntry->getControl();
-} catch (Zend_Gdata_App_Exception $e) {
-    echo $e->getMessage();
-}
-
-if ($control instanceof Zend_Gdata_App_Extension_Control) {
-    if ($control->getDraft() != null &&
-        $control->getDraft()->getText() == 'yes') {
-        $state = $videoEntry->getVideoState();
-
-        if ($state instanceof Zend_Gdata_YouTube_Extension_State) {
-            print 'Upload status: '
-                  . $state->getName()
-                  .' '. $state->getText();
-        } else {
-            print 'Not able to retrieve the video status information'
-                  .' yet. ' . "Please try again shortly.\n";
-        }
-    }
-}
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.other">
-        <title>Other Functions</title>
-
-        <para>
-            In addition to the functionality described above, the YouTube <acronym>API</acronym>
-            contains many other functions that allow you to modify video meta-data,
-            delete video entries and use the full range of community features on the site. Some of
-            the community features that can be modified through the <acronym>API</acronym> include:
-            ratings, comments, playlists, subscriptions, user profiles, contacts and messages.
-        </para>
-        <para>
-            Please refer to the full documentation available in the <ulink
-                url="http://code.google.com/apis/youtube/developers_guide_php.html">PHP Developer's
-                Guide</ulink> on code.google.com.
-        </para>
-    </sect2>
-</sect1>

+ 0 - 7
documentation/manual/ja/module_specs/Zend_Gdata-Introduction.xml

@@ -59,13 +59,6 @@
             </listitem>
             <listitem>
                 <para>
-                    <link linkend="zend.gdata.youtube">YouTube</link>
-                    は、動画やコメント、お気に入り、登録チャンネル、
-                    ユーザのプロファイルといった情報を検索して取得できます。
-                </para>
-            </listitem>
-            <listitem>
-                <para>
                     <link linkend="zend.gdata.photos">Picasa Web Albums</link>
                     は、オンラインの写真共有アプリケーションです。
                 </para>

+ 0 - 638
documentation/manual/ja/module_specs/Zend_Gdata_YouTube.xml

@@ -1,638 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Reviewed: no -->
-<!-- EN-Revision: 24249 -->
-<sect1 id="zend.gdata.youtube">
-    <title>YouTube Data API の使用法</title>
-
-    <para>
-        YouTube data <acronym>API</acronym> は、YouTube のコンテンツを読み書きする機能を提供します。
-        認証済みでないリクエストを Google Data フィードに実行し、
-        人気のある動画やコメント、YouTube 登録ユーザの公開情報
-        (たとえばプレイリストや購読内容、コンタクトなど)
-        を取得できます。
-    </para>
-
-    <para>
-        YouTube Data <acronym>API</acronym> についての詳細は、code.google.com の
-        <ulink url="http://code.google.com/apis/youtube/developers_guide_php.html">
-        <acronym>PHP</acronym> Developer's Guide</ulink> を参照ください。
-    </para>
-
-    <sect2 id="zend.gdata.youtube.authentication">
-        <title>認証</title>
-        <para>
-          YouTube Data <acronym>API</acronym> は、公開データへの読み取り専用アクセス機能を提供しており、
-          認証は不要です。書き込みリクエストを行う場合は、ClientLogin
-          あるいは AuthSub でのユーザ認証が必要となります。詳細は
-          <ulink url="http://code.google.com/apis/youtube/developers_guide_php.html#Authentication">
-          <acronym>PHP</acronym> Developer's Guide の認証のセクション</ulink>
-          を参照ください。
-        </para>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.developer_key">
-        <title>Developer Keys および Client ID</title>
-        <para>
-            デベロッパーキーは、<acronym>API</acronym> リクエストを行う YouTube
-            開発者を識別するためのものです。クライアント ID
-            は、ログの記録やデバッグなどの際にアプリケーションを識別するものです。
-            <ulink url="http://code.google.com/apis/youtube/dashboard/">http://code.google.com/apis/youtube/dashboard/</ulink>
-            でデベロッパーキーとクライアント ID を取得できます。
-            下の例は、デベロッパーキーとクライアント ID を
-            <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube.html">Zend_Gdata_YouTube</ulink>
-            サービスオブジェクトに渡すものです。
-        </para>
-        <example id="zend.gdata.youtube.developer_key.example">
-          <title>Developer Key と ClientID を Zend_Gdata_YouTube に渡す</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient,
-                             $applicationId,
-                             $clientId,
-                             $developerKey);
-]]></programlisting>
-            </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.videos">
-        <title>公開動画フィードの取得</title>
-
-        <para>
-            YouTube data <acronym>API</acronym> はさまざまなフィードを提供しており、
-            たとえば標準の動画一覧や関連する動画一覧、動画への返信一覧、
-            アップロードした動画の一覧、お気に入りの動画一覧などを取得できます。
-            たとえばアップロードした動画一覧のフィードは、
-            指定したユーザがアップロードしたすべての動画を返します。
-            どのようなフィードが取得できるのかについては
-            <ulink url="http://code.google.com/apis/youtube/reference.html#Video_Feeds">
-            YouTube <acronym>API</acronym> リファレンスガイド</ulink> を参照ください。
-        </para>
-
-        <sect3 id="zend.gdata.youtube.videos.searching">
-            <title>メタデータによる動画の検索</title>
-
-            <para>
-                指定した条件にマッチする動画の一覧を、YouTubeQuery
-                クラスを用いて取得できます。
-                たとえば次のクエリは、メタデータに "cat" という単語を含む動画を探し、
-                その結果の 10 番目から 1 ページあたり 20 件ずつ表示します。
-                また、閲覧回数順に表示します。
-            </para>
-        <example id="zend.gdata.youtube.videos.searching.example">
-          <title>動画の検索</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->videoQuery = 'cat';
-$query->startIndex = 10;
-$query->maxResults = 20;
-$query->orderBy = 'viewCount';
-
-echo $query->queryUrl . "\n";
-$videoFeed = $yt->getVideoFeed($query);
-
-foreach ($videoFeed as $videoEntry) {
-    echo "---------動画----------\n";
-    echo "タイトル: " . $videoEntry->getVideoTitle() . "\n";
-    echo "\n説明:\n";
-    echo $videoEntry->getVideoDescription();
-    echo "\n\n\n";
-}
-]]></programlisting>
-            </example>
-
-            <para>
-                その他のクエリパラメータの詳細は
-                <ulink url="http://code.google.com/apis/youtube/reference.html#Searching_for_videos">
-                リファレンスガイド</ulink>を参照ください。
-                <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoQuery.html">
-                <classname>Zend_Gdata_YouTube_VideoQuery</classname></ulink>
-                には、これらのパラメータ用のヘルパー関数もあります。詳細は
-                <ulink url="http://code.google.com/apis/youtube/developers_guide_php.html#SearchingVideos"><acronym>PHP</acronym> Developer's Guide</ulink>
-                を参照ください。
-            </para>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.searchingcategories">
-            <title>カテゴリやタグ/キーワードによる動画の検索</title>
-
-            <para>
-                カテゴリを指定して動画を検索するには、
-                <ulink url="http://code.google.com/apis/youtube/reference.html#Category_search">
-                専用の <acronym>URL</acronym> を作成します</ulink>。たとえば、dog
-                というキーワードを含むコメディーの動画を検索するには次のようにします。
-            </para>
-             <example id="zend.gdata.youtube.videos.searchingcategories.example">
-          <title>指定したカテゴリの動画の検索</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->category = 'Comedy/dog';
-
-echo $query->queryUrl . "\n";
-$videoFeed = $yt->getVideoFeed($query);
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.standard">
-            <title>標準のフィード</title>
-
-            <para>
-                YouTube Data <acronym>API</acronym> が提供する
-                <ulink url="http://code.google.com/apis/youtube/reference.html#Standard_feeds">
-                標準フィード</ulink> にはさまざまなものがあります。
-                これらの標準フィードは、<acronym>URL</acronym> を指定することで
-                <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoFeed.html">Zend_Gdata_YouTube_VideoFeed</ulink>
-                オブジェクトとして取得できます。<acronym>URL</acronym> の指定には
-                <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube.html">Zend_Gdata_YouTube</ulink>
-                クラスの定義済み定数
-                (たとえば Zend_Gdata_YouTube::STANDARD_TOP_RATED_URI)
-                を使用するか、あるいは定義済みヘルパーメソッド
-                (下のコードを参照ください) を使用します。
-            </para>
-
-            <para>
-                評価の高い動画を取得するヘルパーメソッドは次のようになります。
-            </para>
-            <example id="zend.gdata.youtube.videos.standard.example-1">
-          <title>標準の動画フィードの取得</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getTopRatedVideoFeed();
-]]></programlisting>
-            </example>
-            <para>
-                取得する標準フィードの期間を指定するクエリパラメータもあります。
-            </para>
-
-            <para>
-              たとえば、今日いちばん評価の高い動画を取得するには次のようにします。
-            </para>
-<example id="zend.gdata.youtube.videos.standard.example-2">
-          <title>Zend_Gdata_YouTube_VideoQuery を使用した動画の取得</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$query = $yt->newVideoQuery();
-$query->setTime('today');
-$videoFeed = $yt->getTopRatedVideoFeed($query);
-]]></programlisting>
-            </example>
-            <para>
-                あるいは、次のように <acronym>URL</acronym> を使用してフィードを取得することもできます。
-            </para>
-
-<example id="zend.gdata.youtube.videos.standard.example-3">
-          <title>URL からの動画フィードの取得</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$url = 'http://gdata.youtube.com/feeds/standardfeeds/top_rated?time=today'
-$videoFeed = $yt->getVideoFeed($url);
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.user">
-            <title>指定したユーザがアップロードした動画の取得</title>
-
-            <para>
-                指定したユーザがアップロードした動画の一覧を取得するヘルパーメソッドもあります。
-                次の例は、ユーザ 'liz' がアップロードした動画の一覧を取得します。
-            </para>
-            <example id="zend.gdata.youtube.videos.user.example">
-          <title>指定したユーザがアップロードした動画の取得</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getUserUploads('liz');
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.favorites">
-            <title>指定したユーザのお気に入り動画の取得</title>
-
-            <para>
-                指定したユーザのお気に入り動画の一覧を取得するヘルパーメソッドもあります。
-                次の例は、ユーザ 'liz' のお気に入り動画の一覧を取得します。
-            </para>
-            <example id="zend.gdata.youtube.videos.favorites.example">
-          <title>指定したユーザのお気に入り動画の取得</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getUserFavorites('liz');
-]]></programlisting>
-            </example>
-
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.videos.responses">
-            <title>動画に対する返信動画の取得</title>
-
-            <para>
-                指定した動画に対する動画の返信の一覧を取得するヘルパーメソッドもあります。
-                次の例は、ID 'abc123813abc' の動画に対する返信動画を取得します。
-            </para>
-            <example id="zend.gdata.youtube.videos.responses.example">
-          <title>動画への返信のフィードの取得</title>
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoFeed = $yt->getVideoResponseFeed('abc123813abc');
-]]></programlisting>
-            </example>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.comments">
-        <title>動画のコメントの取得</title>
-
-        <para>
-            YouTube の動画に対するコメントを取得するにはいくつかの方法があります。
-            ID 'abc123813abc' の動画に対するコメントを取得するコードは、次のようになります。
-        </para>
-            <example id="zend.gdata.youtube.videos.comments.example-1">
-          <title>動画 ID からの動画へのコメントのフィードの取得</title>
-
-        <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$commentFeed = $yt->getVideoCommentFeed('abc123813abc');
-
-foreach ($commentFeed as $commentEntry) {
-    echo $commentEntry->title->text . "\n";
-    echo $commentEntry->content->text . "\n\n\n";
-}
-]]></programlisting>
-        </example>
-
-        <para>
-            もし既にその動画を表す
-            <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-            オブジェクトがあるのなら、それを用いてその動画のコメントを取得することもできます。
-        </para>
-           <example id="zend.gdata.youtube.videos.comments.example-2">
-          <title>Zend_Gdata_YouTube_VideoEntry からの動画へのコメントのフィードの取得</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$videoEntry = $yt->getVideoEntry('abc123813abc');
-// 動画の ID がわからなくても、このようにして URL を取得できます
-$commentFeed = $yt->getVideoCommentFeed(null,
-                                        $videoEntry->comments->href);
-]]></programlisting>
-            </example>
-
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.playlists">
-        <title>プレイリストフィードの取得</title>
-
-        <para>
-            YouTube data <acronym>API</acronym> を使用すると、
-            プロファイルやプレイリスト、購読内容といったユーザ情報を取得できます。
-        </para>
-
-        <sect3 id="zend.gdata.youtube.playlists.user">
-            <title>指定したユーザのプレイリストの取得</title>
-
-            <para>
-                このライブラリには、指定したユーザのプレイリストを取得するためのヘルパーメソッドがあります。
-                ユーザ 'liz' のプレイリストを取得するには、次のようにします。
-            </para>
-                       <example id="zend.gdata.youtube.playlists.user.example">
-          <title>指定したユーザのプレイリストの取得</title>
-
-            <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$playlistListFeed = $yt->getPlaylistListFeed('liz');
-
-foreach ($playlistListFeed as $playlistEntry) {
-    echo $playlistEntry->title->text . "\n";
-    echo $playlistEntry->description->text . "\n";
-    echo $playlistEntry->getPlaylistVideoFeedUrl() . "\n\n\n";
-}
-]]></programlisting>
-            </example>
-        </sect3>
-
-        <sect3 id="zend.gdata.youtube.playlists.special">
-            <title>指定したプレイリストの取得</title>
-
-            <para>
-                このライブラリには、
-                指定したプレイリストの動画一覧を取得するヘルパーメソッドがあります。
-                指定したプレイリストエントリの動画一覧を取得するには、次のようにします。
-            </para>
-          <example id="zend.gdata.youtube.playlists.special.example">
-          <title>指定したプレイリストの取得</title>
-            <programlisting language="php"><![CDATA[
-$feedUrl = $playlistEntry->getPlaylistVideoFeedUrl();
-$playlistVideoFeed = $yt->getPlaylistVideoFeed($feedUrl);
-]]></programlisting>
-            </example>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.subscriptions">
-        <title>指定したユーザの購読内容の一覧の取得</title>
-
-        <para>
-            ユーザは、チャンネルやタグ、お気に入りなどの内容を購読できます。
-            <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_SubscriptionEntry.html">Zend_Gdata_YouTube_SubscriptionEntry</ulink>
-            を使用して、それらの購読内容を表します。
-        </para>
-
-        <para>
-            ユーザ 'liz' のすべての購読内容を取得するには、次のようにします。
-        </para>
-        <example id="zend.gdata.youtube.subscriptions.example">
-          <title>指定したユーザのすべての購読の取得</title>
-
-        <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$subscriptionFeed = $yt->getSubscriptionFeed('liz');
-
-foreach ($subscriptionFeed as $subscriptionEntry) {
-    echo $subscriptionEntry->title->text . "\n";
-}
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.profile">
-        <title>ユーザのプロファイルの取得</title>
-
-        <para>
-            任意の YouTube ユーザの公開プロファイル情報を取得できます。
-            ユーザ 'liz' のプロファイルを取得するには、次のようにします。
-        </para>
-                  <example id="zend.gdata.youtube.profile.example">
-          <title>ユーザのプロファイルの取得</title>
-
-        <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube();
-$userProfile = $yt->getUserProfile('liz');
-echo "ユーザ名: " . $userProfile->username->text . "\n";
-echo "年齢: " . $userProfile->age->text . "\n";
-echo "出身地: " . $userProfile->hometown->text . "\n";
-]]></programlisting>
-        </example>
-    </sect2>
-
-    <sect2 id="zend.gdata.youtube.uploads">
-      <title>YouTube への動画のアップロード</title>
-
-      <para>
-        アップロードのおおまかな手順については、code.google.com の
-        <ulink url="http://code.google.com/apis/youtube/developers_guide_protocol.html#Process_Flows_for_Uploading_Videos">
-        プロトコルガイド</ulink>の図を参照ください。
-        動画のアップロードには 2 通りの方法があります。
-        動画を直接送信するか、単に動画のメタデータだけを送信して動画は
-        <acronym>HTML</acronym> フォームでアップロードさせるかです。
-      </para>
-
-      <para>
-        動画を直接アップロードするには、まず新しい
-        <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-        オブジェクトを作成して必須メタデータを指定しなければなりません。
-        次の例は、Quicktime 動画 "mytestmovie.mov" を以下のプロパティで
-        YouTube にアップロードするものです。
-      </para>
-        <table id="zend.gdata.youtube.uploads.metadata">
-          <title>以下のサンプルで使用するメタデータ</title>
-          <tgroup cols="2" align="left" colsep="1" rowsep="1">
-            <thead>
-              <row>
-                <entry>プロパティ</entry>
-                <entry>値</entry>
-              </row>
-            </thead>
-            <tbody>
-              <row>
-                <entry>Title</entry>
-                <entry>My Test Movie</entry>
-              </row>
-              <row>
-                <entry>Category</entry>
-                <entry>Autos</entry>
-              </row>
-              <row>
-                <entry>Keywords</entry>
-                <entry>cars, funny</entry>
-              </row>
-              <row>
-                <entry>Description</entry>
-                <entry>My description</entry>
-              </row>
-              <row>
-                <entry>Filename</entry>
-                <entry>mytestmovie.mov</entry>
-              </row>
-              <row>
-                <entry>File <acronym>MIME</acronym> type</entry>
-                <entry>video/quicktime</entry>
-              </row>
-              <row>
-                <entry>Video private?</entry>
-                <entry><constant>FALSE</constant></entry>
-              </row>
-              <row>
-                <entry>Video location</entry>
-                <entry>37, -122 (lat, long)</entry>
-              </row>
-              <row>
-                <entry>Developer Tags</entry>
-                <entry>mydevelopertag, anotherdevelopertag</entry>
-              </row>
-            </tbody>
-            </tgroup>
-      </table>
-      <para>
-        下のコードは、アップロード用に空の
-        <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-        を作成します。次に
-        <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_App_MediaFileSource.html">Zend_Gdata_App_MediaFileSource</ulink>
-        オブジェクトを使用して実際の動画ファイルを保持させます。水面下では、
-        <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_Extension_MediaGroup.html">Zend_Gdata_YouTube_Extension_MediaGroup</ulink>
-        オブジェクトを使用して動画のすべてのメタデータを保持します。
-        以下で説明するヘルパーメソッドを使用すると、
-        メディアグループオブジェクトのことを気にせず動画のメタデータを設定できます。
-        $uploadUrl は、新しいエントリを投稿する場所です。
-        これは、認証済みユーザの名前 $userName で指定することもできますし、
-        シンプルに 'default' と指定して現在の認証済みユーザを自動的に利用することもできます。
-      </para>
-          <example id="zend.gdata.youtube.uploads.example">
-          <title>動画のアップロード</title>
-
-    <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient);
-$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
-
-$filesource = $yt->newMediaFileSource('mytestmovie.mov');
-$filesource->setContentType('video/quicktime');
-$filesource->setSlug('mytestmovie.mov');
-
-$myVideoEntry->setMediaSource($filesource);
-
-$myVideoEntry->setVideoTitle('My Test Movie');
-$myVideoEntry->setVideoDescription('My Test Movie');
-// カテゴリは YouTube のカテゴリとして妥当な形式でなければならないことに注意 !
-$myVideoEntry->setVideoCategory('Comedy');
-
-// キーワードを設定します。カンマ区切りの文字列であり、
-// 各キーワードには空白文字を含めてはいけないことに注意しましょう
-$myVideoEntry->SetVideoTags('cars, funny');
-
-// オプションで、デベロッパタグを指定します
-$myVideoEntry->setVideoDeveloperTags(array('mydevelopertag',
-                                           'anotherdevelopertag'));
-
-// オプションで、動画の撮影場所を指定します
-$yt->registerPackage('Zend_Gdata_Geo');
-$yt->registerPackage('Zend_Gdata_Geo_Extension');
-$where = $yt->newGeoRssWhere();
-$position = $yt->newGmlPos('37.0 -122.0');
-$where->point = $yt->newGmlPoint($position);
-$myVideoEntry->setWhere($where);
-
-// 現在の認証済みユーザ用のアップロード URI
-$uploadUrl =
-    'http://uploads.gdata.youtube.com/feeds/users/default/uploads';
-
-// 動画をアップロードし、Zend_Gdata_App_HttpException あるいは通常の
-// Zend_Gdata_App_Exception を捕捉します
-
-try {
-    $newEntry = $yt->insertEntry($myVideoEntry,
-                                 $uploadUrl,
-                                 'Zend_Gdata_YouTube_VideoEntry');
-} catch (Zend_Gdata_App_HttpException $httpException) {
-    echo $httpException->getRawResponseBody();
-} catch (Zend_Gdata_App_Exception $e) {
-    echo $e->getMessage();
-}
-]]></programlisting>
-</example>
-    <para>
-      非公開で動画をアップロードするには、アップロードの前に
-      $myVideoEntry->setVideoPrivate(); を実行します。
-      $videoEntry->isVideoPrivate() を使用すると、
-      その動画エントリが非公開かどうかを調べることができます。
-    </para>
-  </sect2>
-
-    <sect2 id="zend.gdata.youtube.uploads.browser">
-      <title>ブラウザベースのアップロード</title>
-
-      <para>
-        ブラウザベースのアップロードも直接のアップロードとほとんど同じ処理ですが、
-        作成した
-        <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-        に
-        <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_App_MediaFileSource.html">Zend_Gdata_App_MediaFileSource</ulink>
-        オブジェクトをアタッチしないという点が異なります。
-        そのかわりに、動画のすべてのメタデータを送信してトークン要素を受け取り、
-        それを用いて <acronym>HTML</acronym> アップロードフォームを作成します。
-      </para>
-          <example id="zend.gdata.youtube.uploads.browser.example-1">
-          <title>ブラウザベースのアップロード</title>
-
-      <programlisting language="php"><![CDATA[
-$yt = new Zend_Gdata_YouTube($httpClient);
-
-$myVideoEntry= new Zend_Gdata_YouTube_VideoEntry();
-$myVideoEntry->setVideoTitle('My Test Movie');
-$myVideoEntry->setVideoDescription('My Test Movie');
-
-// YouTube のカテゴリとして妥当な形式でなければならないことに注意
-$myVideoEntry->setVideoCategory('Comedy');
-$myVideoEntry->SetVideoTags('cars, funny');
-
-$tokenHandlerUrl = 'http://gdata.youtube.com/action/GetUploadToken';
-$tokenArray = $yt->getFormUploadToken($myVideoEntry, $tokenHandlerUrl);
-$tokenValue = $tokenArray['token'];
-$postUrl = $tokenArray['url'];
-]]></programlisting>
-      </example>
-    <para>
-      上のコードは、リンクとトークンを表示します。
-      これらを元に、ユーザのブラウザに表示させる <acronym>HTML</acronym> フォームを構築します。
-      シンプルなフォームの例を以下に示します。
-      $tokenValue が返されたトークン要素の中身をあらわしており、
-      これは上の $myVideoEntry から取得したものです。
-      フォームを送信したあとであなたのサイトにリダイレクトさせるには、
-      パラメータ $nextUrl を上の $postUrl に追加します。
-      これは、AuthSub リンクにおけるパラメータ $next と同じように機能します。
-      唯一の違いは、一度きりのトークンではなく
-      status と id を <acronym>URL</acronym> の中に含めて返すということです。
-    </para>
-          <example id="zend.gdata.youtube.uploads.browser.example-2">
-          <title>ブラウザベースのアップロード: HTML フォームの作成</title>
-
-      <programlisting language="php"><![CDATA[
-// アップロード後のリダイレクト先
-$nextUrl = 'http://mysite.com/youtube_uploads';
-
-$form = '<form action="'. $postUrl .'?nexturl='. $nextUrl .
-        '" method="post" enctype="multipart/form-data">'.
-        '<input name="file" type="file"/>'.
-        '<input name="token" type="hidden" value="'. $tokenValue .'"/>'.
-        '<input value="動画のアップロード" type="submit" />'.
-        '</form>';
-]]></programlisting>
-      </example>
-  </sect2>
-    <sect2 id="zend.gdata.youtube.uploads.status">
-      <title>アップロード状況のチェック</title>
-
-      <para>
-        動画をアップロードしたら、認証済みユーザのアップロードフィードにすぐに反映されます。
-        しかし、公開手続きがすむまではサイト上では公開されません。
-        却下された動画やアップロードが正常終了しなかった動画についても、
-        認証ユーザのアップロードフィードのみに現れるようになります。
-        次のコードは、
-        <ulink url="http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_YouTube_VideoEntry.html">Zend_Gdata_YouTube_VideoEntry</ulink>
-        の状態をチェックして、公開されているかいないか、また却下されたのかどうかを調べます。
-      </para>
-      <example id="zend.gdata.youtube.uploads.status.example">
-          <title>動画のアップロード状況のチェック</title>
-
-      <programlisting language="php"><![CDATA[
-try {
-    $control = $videoEntry->getControl();
-} catch (Zend_Gdata_App_Exception $e) {
-    echo $e->getMessage();
-}
-
-if ($control instanceof Zend_Gdata_App_Extension_Control) {
-    if ($control->getDraft() != null &&
-        $control->getDraft()->getText() == 'yes') {
-        $state = $videoEntry->getVideoState();
-
-        if ($state instanceof Zend_Gdata_YouTube_Extension_State) {
-            print 'アップロード状況: '
-                  . $state->getName()
-                  .' '. $state->getText();
-        } else {
-            print 'まだ動画の状況についての情報を取得できません。'
-                  . "また後で試してみてください。\n";
-        }
-    }
-}
-]]></programlisting>
-      </example>
-  </sect2>
-    <sect2 id="zend.gdata.youtube.other">
-      <title>その他の関数</title>
-
-      <para>
-        これまで説明してきたもの以外にも YouTube API にはさまざまな機能が存在し、
-        動画のメタデータを編集したり動画エントリを削除したり、
-        サイト上のコミュニティ機能を利用したりといったことが可能です。
-        API で操作できるコミュニティ機能としては、
-        評価やコメント、プレイリスト、購読、ユーザプロファイル、コンタクト、メッセージなどがあります。
-      </para>
-      <para>
-        完全なドキュメントは、code.google.com の
-        <ulink url="http://code.google.com/apis/youtube/developers_guide_php.html"><acronym>PHP</acronym> Developer's Guide</ulink>
-        を参照ください。
-      </para>
-    </sect2>
-</sect1>

+ 0 - 876
library/Zend/Gdata/YouTube.php

@@ -1,876 +0,0 @@
-<?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_Media
- */
-require_once 'Zend/Gdata/Media.php';
-
-/**
- * @see Zend_Gdata_YouTube_VideoEntry
- */
-require_once 'Zend/Gdata/YouTube/VideoEntry.php';
-
-/**
- * @see Zend_Gdata_YouTube_VideoFeed
- */
-require_once 'Zend/Gdata/YouTube/VideoFeed.php';
-
-/**
- * @see Zend_Gdata_YouTube_CommentFeed
- */
-require_once 'Zend/Gdata/YouTube/CommentFeed.php';
-
-/**
- * @see Zend_Gdata_YouTube_PlaylistListFeed
- */
-require_once 'Zend/Gdata/YouTube/PlaylistListFeed.php';
-
-/**
- * @see Zend_Gdata_YouTube_SubscriptionFeed
- */
-require_once 'Zend/Gdata/YouTube/SubscriptionFeed.php';
-
-/**
- * @see Zend_Gdata_YouTube_ContactFeed
- */
-require_once 'Zend/Gdata/YouTube/ContactFeed.php';
-
-/**
- * @see Zend_Gdata_YouTube_PlaylistVideoFeed
- */
-require_once 'Zend/Gdata/YouTube/PlaylistVideoFeed.php';
-
-/**
- * @see Zend_Gdata_YouTube_ActivityFeed
- */
-require_once 'Zend/Gdata/YouTube/ActivityFeed.php';
-
-/**
- * @see Zend_Gdata_YouTube_InboxFeed
- */
-require_once 'Zend/Gdata/YouTube/InboxFeed.php';
-
-/** @see Zend_Xml_Security */
-require_once 'Zend/Xml/Security.php';
-
-/**
- * Service class for interacting with the YouTube Data API.
- * @link http://code.google.com/apis/youtube/
- *
- * @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 extends Zend_Gdata_Media
-{
-
-    const AUTH_SERVICE_NAME = 'youtube';
-    const CLIENTLOGIN_URL = 'https://www.google.com/youtube/accounts/ClientLogin';
-
-    const STANDARD_TOP_RATED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/top_rated';
-    const STANDARD_MOST_VIEWED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed';
-    const STANDARD_RECENTLY_FEATURED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/recently_featured';
-    const STANDARD_WATCH_ON_MOBILE_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile';
-
-    const STANDARD_TOP_RATED_URI_V2 =
-        'https://gdata.youtube.com/feeds/api/standardfeeds/top_rated';
-    const STANDARD_MOST_VIEWED_URI_V2 =
-        'https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed';
-    const STANDARD_RECENTLY_FEATURED_URI_V2 =
-        'https://gdata.youtube.com/feeds/api/standardfeeds/recently_featured';
-    const STANDARD_WATCH_ON_MOBILE_URI_V2 =
-        'https://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile';
-
-    const USER_URI = 'https://gdata.youtube.com/feeds/api/users';
-    const VIDEO_URI = 'https://gdata.youtube.com/feeds/api/videos';
-    const PLAYLIST_REL = 'http://gdata.youtube.com/schemas/2007#playlist';
-    const USER_UPLOADS_REL = 'http://gdata.youtube.com/schemas/2007#user.uploads';
-    const USER_PLAYLISTS_REL = 'http://gdata.youtube.com/schemas/2007#user.playlists';
-    const USER_SUBSCRIPTIONS_REL = 'http://gdata.youtube.com/schemas/2007#user.subscriptions';
-    const USER_CONTACTS_REL = 'http://gdata.youtube.com/schemas/2007#user.contacts';
-    const USER_FAVORITES_REL = 'http://gdata.youtube.com/schemas/2007#user.favorites';
-    const VIDEO_RESPONSES_REL = 'http://gdata.youtube.com/schemas/2007#video.responses';
-    const VIDEO_RATINGS_REL = 'http://gdata.youtube.com/schemas/2007#video.ratings';
-    const VIDEO_COMPLAINTS_REL = 'http://gdata.youtube.com/schemas/2007#video.complaints';
-    const ACTIVITY_FEED_URI = 'https://gdata.youtube.com/feeds/api/events';
-    const FRIEND_ACTIVITY_FEED_URI =
-        'https://gdata.youtube.com/feeds/api/users/default/friendsactivity';
-
-    /**
-     * The URI of the in-reply-to schema for comments in reply to
-     * other comments.
-     *
-     * @var string
-     */
-     const IN_REPLY_TO_SCHEME =
-         'http://gdata.youtube.com/schemas/2007#in-reply-to';
-
-    /**
-     * The URI of the inbox feed for the currently authenticated user.
-     *
-     * @var string
-     */
-    const INBOX_FEED_URI =
-        'https://gdata.youtube.com/feeds/api/users/default/inbox';
-
-    /**
-     * The maximum number of users for which activity can be requested for,
-     * as enforced by the API.
-     *
-     * @var integer
-     */
-    const ACTIVITY_FEED_MAX_USERS = 20;
-
-    /**
-     * The suffix for a feed of favorites.
-     *
-     * @var string
-     */
-    const FAVORITES_URI_SUFFIX = 'favorites';
-
-    /**
-     * The suffix for the user's upload feed.
-     *
-     * @var string
-     */
-    const UPLOADS_URI_SUFFIX = 'uploads';
-
-    /**
-     * The suffix for a feed of video responses.
-     *
-     * @var string
-     */
-    const RESPONSES_URI_SUFFIX = 'responses';
-
-    /**
-     * The suffix for a feed of related videos.
-     *
-     * @var string
-     */
-    const RELATED_URI_SUFFIX = 'related';
-
-    /**
-     * The suffix for a feed of messages (inbox entries).
-     *
-     * @var string
-     */
-    const INBOX_URI_SUFFIX = 'inbox';
-
-    /**
-     * Namespaces used for Zend_Gdata_YouTube
-     *
-     * @var array
-     */
-    public static $namespaces = array(
-        array('yt', 'http://gdata.youtube.com/schemas/2007', 1, 0),
-        array('georss', 'http://www.georss.org/georss', 1, 0),
-        array('gml', 'http://www.opengis.net/gml', 1, 0),
-        array('media', 'http://search.yahoo.com/mrss/', 1, 0)
-    );
-
-    /**
-     * Create Zend_Gdata_YouTube object
-     *
-     * @param Zend_Http_Client $client (optional) The HTTP client to use when
-     *          when communicating with the Google servers.
-     * @param string $applicationId The identity of the app in the form of
-     *        Company-AppName-Version
-     * @param string $clientId The clientId issued by the YouTube dashboard
-     * @param string $developerKey The developerKey issued by the YouTube dashboard
-     */
-    public function __construct($client = null,
-        $applicationId = 'MyCompany-MyApp-1.0', $clientId = null,
-        $developerKey = null)
-    {
-        $this->registerPackage('Zend_Gdata_YouTube');
-        $this->registerPackage('Zend_Gdata_YouTube_Extension');
-        $this->registerPackage('Zend_Gdata_Media');
-        $this->registerPackage('Zend_Gdata_Media_Extension');
-
-        // NOTE This constructor no longer calls the parent constructor
-        $this->setHttpClient($client, $applicationId, $clientId, $developerKey);
-    }
-
-    /**
-     * Set the Zend_Http_Client object used for communication
-     *
-     * @param Zend_Http_Client $client The client to use for communication
-     * @throws Zend_Gdata_App_HttpException
-     * @return Zend_Gdata_App Provides a fluent interface
-     */
-    public function setHttpClient($client,
-        $applicationId = 'MyCompany-MyApp-1.0', $clientId = null,
-        $developerKey = null)
-    {
-        if ($client === null) {
-            $client = new Zend_Http_Client();
-        }
-        if (!$client instanceof Zend_Http_Client) {
-            require_once 'Zend/Gdata/App/HttpException.php';
-            throw new Zend_Gdata_App_HttpException(
-                'Argument is not an instance of Zend_Http_Client.');
-        }
-
-        if ($clientId != null) {
-            $client->setHeaders('X-GData-Client', $clientId);
-        }
-
-        if ($developerKey != null) {
-            $client->setHeaders('X-GData-Key', 'key='. $developerKey);
-        }
-
-        return parent::setHttpClient($client, $applicationId);
-    }
-
-    /**
-     * Retrieves a feed of videos.
-     *
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_VideoFeed The feed of videos found at the
-     *         specified URL.
-     */
-    public function getVideoFeed($location = null)
-    {
-        if ($location == null) {
-            $uri = self::VIDEO_URI;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-    /**
-     * Retrieves a specific video entry.
-     *
-     * @param mixed $videoId The ID of the video to retrieve.
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined.
-     * @param boolean $fullEntry (optional) Retrieve the full metadata for the
-     *         entry. Only possible if entry belongs to currently authenticated
-     *         user. An exception will be thrown otherwise.
-     * @throws Zend_Gdata_App_HttpException
-     * @return Zend_Gdata_YouTube_VideoEntry The video entry found at the
-     *         specified URL.
-     */
-    public function getVideoEntry($videoId = null, $location = null,
-        $fullEntry = false)
-    {
-        if ($videoId !== null) {
-            if ($fullEntry) {
-                return $this->getFullVideoEntry($videoId);
-            } else {
-                $uri = self::VIDEO_URI . "/" . $videoId;
-            }
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getEntry($uri, 'Zend_Gdata_YouTube_VideoEntry');
-    }
-
-    /**
-     * Retrieves a video entry from the user's upload feed.
-     *
-     * @param mixed $videoID The ID of the video to retrieve.
-     * @throws Zend_Gdata_App_HttpException
-     * @return Zend_Gdata_YouTube_VideoEntry|null The video entry to be
-     *          retrieved, or null if it was not found or the user requesting it
-     *          did not have the appropriate permissions.
-     */
-    public function getFullVideoEntry($videoId)
-    {
-        $uri = self::USER_URI . "/default/" .
-            self::UPLOADS_URI_SUFFIX . "/$videoId";
-        return parent::getEntry($uri, 'Zend_Gdata_YouTube_VideoEntry');
-    }
-
-    /**
-     * Retrieves a feed of videos related to the specified video ID.
-     *
-     * @param string $videoId The videoId of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_VideoFeed The feed of videos found at the
-     *         specified URL.
-     */
-    public function getRelatedVideoFeed($videoId = null, $location = null)
-    {
-        if ($videoId !== null) {
-            $uri = self::VIDEO_URI . "/" . $videoId . "/" .
-                self::RELATED_URI_SUFFIX;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-    /**
-     * Retrieves a feed of video responses related to the specified video ID.
-     *
-     * @param string $videoId The videoId of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_VideoFeed The feed of videos found at the
-     *         specified URL.
-     */
-    public function getVideoResponseFeed($videoId = null, $location = null)
-    {
-        if ($videoId !== null) {
-            $uri = self::VIDEO_URI . "/" . $videoId . "/" .
-                self::RESPONSES_URI_SUFFIX;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-    /**
-     * Retrieves a feed of comments related to the specified video ID.
-     *
-     * @param string $videoId The videoId of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_CommentFeed The feed of videos found at the
-     *         specified URL.
-     */
-    public function getVideoCommentFeed($videoId = null, $location = null)
-    {
-        if ($videoId !== null) {
-            $uri = self::VIDEO_URI . "/" . $videoId . "/comments";
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_CommentFeed');
-    }
-
-    /**
-     * Retrieves a feed of comments related to the specified video ID.
-     *
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_CommentFeed The feed of videos found at the
-     *         specified URL.
-     */
-    public function getTopRatedVideoFeed($location = null)
-    {
-        $standardFeedUri = self::STANDARD_TOP_RATED_URI;
-
-        if ($this->getMajorProtocolVersion() == 2) {
-            $standardFeedUri = self::STANDARD_TOP_RATED_URI_V2;
-        }
-
-        if ($location == null) {
-            $uri = $standardFeedUri;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            if ($location instanceof Zend_Gdata_YouTube_VideoQuery) {
-                if (!isset($location->url)) {
-                    $location->setFeedType('top rated');
-                }
-            }
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-
-    /**
-     * Retrieves a feed of the most viewed videos.
-     *
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_VideoFeed The feed of videos found at the
-     *         specified URL.
-     */
-    public function getMostViewedVideoFeed($location = null)
-    {
-        $standardFeedUri = self::STANDARD_MOST_VIEWED_URI;
-
-        if ($this->getMajorProtocolVersion() == 2) {
-            $standardFeedUri = self::STANDARD_MOST_VIEWED_URI_V2;
-        }
-
-        if ($location == null) {
-            $uri = $standardFeedUri;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            if ($location instanceof Zend_Gdata_YouTube_VideoQuery) {
-                if (!isset($location->url)) {
-                    $location->setFeedType('most viewed');
-                }
-            }
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-    /**
-     * Retrieves a feed of recently featured videos.
-     *
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_VideoFeed The feed of videos found at the
-     *         specified URL.
-     */
-    public function getRecentlyFeaturedVideoFeed($location = null)
-    {
-        $standardFeedUri = self::STANDARD_RECENTLY_FEATURED_URI;
-
-        if ($this->getMajorProtocolVersion() == 2) {
-            $standardFeedUri = self::STANDARD_RECENTLY_FEATURED_URI_V2;
-        }
-
-        if ($location == null) {
-            $uri = $standardFeedUri;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            if ($location instanceof Zend_Gdata_YouTube_VideoQuery) {
-                if (!isset($location->url)) {
-                    $location->setFeedType('recently featured');
-                }
-            }
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-    /**
-     * Retrieves a feed of videos recently featured for mobile devices.
-     * These videos will have RTSP links in the $entry->mediaGroup->content
-     *
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_VideoFeed The feed of videos found at the
-     *         specified URL.
-     */
-    public function getWatchOnMobileVideoFeed($location = null)
-    {
-        $standardFeedUri = self::STANDARD_WATCH_ON_MOBILE_URI;
-
-        if ($this->getMajorProtocolVersion() == 2) {
-            $standardFeedUri = self::STANDARD_WATCH_ON_MOBILE_URI_V2;
-        }
-
-        if ($location == null) {
-            $uri = $standardFeedUri;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            if ($location instanceof Zend_Gdata_YouTube_VideoQuery) {
-                if (!isset($location->url)) {
-                    $location->setFeedType('watch on mobile');
-                }
-            }
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-    /**
-     * Retrieves a feed which lists a user's playlist
-     *
-     * @param string $user (optional) The username of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_PlaylistListFeed The feed of playlists
-     */
-    public function getPlaylistListFeed($user = null, $location = null)
-    {
-        if ($user !== null) {
-            $uri = self::USER_URI . '/' . $user . '/playlists';
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_PlaylistListFeed');
-    }
-
-    /**
-     * Retrieves a feed of videos in a particular playlist
-     *
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_PlaylistVideoFeed The feed of videos found at
-     *         the specified URL.
-     */
-    public function getPlaylistVideoFeed($location)
-    {
-        if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_PlaylistVideoFeed');
-    }
-
-    /**
-     * Retrieves a feed of a user's subscriptions
-     *
-     * @param string $user (optional) The username of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_SubscriptionListFeed The feed of subscriptions
-     */
-    public function getSubscriptionFeed($user = null, $location = null)
-    {
-        if ($user !== null) {
-            $uri = self::USER_URI . '/' . $user . '/subscriptions';
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_SubscriptionFeed');
-    }
-
-    /**
-     * Retrieves a feed of a user's contacts
-     *
-     * @param string $user (optional) The username of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_ContactFeed The feed of contacts
-     */
-    public function getContactFeed($user = null, $location = null)
-    {
-        if ($user !== null) {
-            $uri = self::USER_URI . '/' . $user . '/contacts';
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_ContactFeed');
-    }
-
-    /**
-     * Retrieves a user's uploads
-     *
-     * @param string $user (optional) The username of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_VideoFeed The videos uploaded by the user
-     */
-    public function getUserUploads($user = null, $location = null)
-    {
-        if ($user !== null) {
-            $uri = self::USER_URI . '/' . $user . '/' .
-                   self::UPLOADS_URI_SUFFIX;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-    /**
-     * Retrieves a user's favorites
-     *
-     * @param string $user (optional) The username of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_VideoFeed The videos favorited by the user
-     */
-    public function getUserFavorites($user = null, $location = null)
-    {
-        if ($user !== null) {
-            $uri = self::USER_URI . '/' . $user . '/' .
-                   self::FAVORITES_URI_SUFFIX;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
-    }
-
-    /**
-     * Retrieves a user's profile as an entry
-     *
-     * @param string $user (optional) The username of interest
-     * @param mixed $location (optional) The URL to query or a
-     *         Zend_Gdata_Query object from which a URL can be determined
-     * @return Zend_Gdata_YouTube_UserProfileEntry The user profile entry
-     */
-    public function getUserProfile($user = null, $location = null)
-    {
-        if ($user !== null) {
-            $uri = self::USER_URI . '/' . $user;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            $uri = $location;
-        }
-        return parent::getEntry($uri, 'Zend_Gdata_YouTube_UserProfileEntry');
-    }
-
-    /**
-     * Helper function for parsing a YouTube token response
-     *
-     * @param string $response The service response
-     * @throws Zend_Gdata_App_Exception
-     * @return array An array containing the token and URL
-     */
-    public static function parseFormUploadTokenResponse($response)
-    {
-        // Load the feed as an XML DOMDocument object
-        @ini_set('track_errors', 1);
-        $doc = new DOMDocument();
-        $doc = @Zend_Xml_Security::scan($response, $doc);
-        @ini_restore('track_errors');
-
-        if (!$doc) {
-            require_once 'Zend/Gdata/App/Exception.php';
-            throw new Zend_Gdata_App_Exception(
-                "Zend_Gdata_YouTube::parseFormUploadTokenResponse - " .
-                "DOMDocument cannot parse XML: $php_errormsg");
-        }
-        $responseElement = $doc->getElementsByTagName('response')->item(0);
-
-        $urlText = null;
-        $tokenText = null;
-        if ($responseElement != null) {
-            $urlElement =
-                $responseElement->getElementsByTagName('url')->item(0);
-            $tokenElement =
-                $responseElement->getElementsByTagName('token')->item(0);
-
-            if ($urlElement && $urlElement->hasChildNodes() &&
-                $tokenElement && $tokenElement->hasChildNodes()) {
-
-                $urlText = $urlElement->firstChild->nodeValue;
-                $tokenText = $tokenElement->firstChild->nodeValue;
-            }
-        }
-
-        if ($tokenText != null && $urlText != null) {
-            return array('token' => $tokenText, 'url' => $urlText);
-        } else {
-            require_once 'Zend/Gdata/App/Exception.php';
-            throw new Zend_Gdata_App_Exception(
-                'Form upload token not found in response');
-        }
-    }
-
-    /**
-     * Retrieves a YouTube token
-     *
-     * @param Zend_Gdata_YouTube_VideoEntry $videoEntry The video entry
-     * @param string $url The location as a string URL
-     * @throws Zend_Gdata_App_Exception
-     * @return array An array containing a token and URL
-     */
-    public function getFormUploadToken($videoEntry,
-        $url='https://gdata.youtube.com/action/GetUploadToken')
-    {
-        if ($url != null && is_string($url)) {
-            // $response is a Zend_Http_response object
-            $response = $this->post($videoEntry, $url);
-            return self::parseFormUploadTokenResponse($response->getBody());
-        } else {
-            require_once 'Zend/Gdata/App/Exception.php';
-            throw new Zend_Gdata_App_Exception(
-                'Url must be provided as a string URL');
-        }
-    }
-
-    /**
-     * Retrieves the activity feed for users
-     *
-     * @param mixed $usernames A string identifying the usernames for which to
-     *              retrieve activity for. This can also be a Zend_Gdata_Query
-     *              object from which a URL can be determined.
-     * @throws Zend_Gdata_App_VersionException if using version less than 2.
-     * @return Zend_Gdata_YouTube_ActivityFeed
-     */
-    public function getActivityForUser($username)
-    {
-        if ($this->getMajorProtocolVersion() == 1) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('User activity feeds ' .
-                'are not available in API version 1.');
-        }
-
-        $uri = null;
-        if ($username instanceof Zend_Gdata_Query) {
-            $uri = $username->getQueryUrl($this->getMajorProtocolVersion());
-        } else {
-            if (count(explode(',', $username)) >
-                self::ACTIVITY_FEED_MAX_USERS) {
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_InvalidArgumentException(
-                    'Activity feed can only retrieve for activity for up to ' .
-                    self::ACTIVITY_FEED_MAX_USERS .  ' users per request');
-            }
-            $uri = self::ACTIVITY_FEED_URI . '?author=' . $username;
-        }
-
-        return parent::getFeed($uri, 'Zend_Gdata_YouTube_ActivityFeed');
-    }
-
-    /**
-     * Retrieve the activity of the currently authenticated users friend.
-     *
-     * @throws Zend_Gdata_App_Exception if not logged in.
-     * @return Zend_Gdata_YouTube_ActivityFeed
-     */
-    public function getFriendActivityForCurrentUser()
-    {
-        if (!$this->isAuthenticated()) {
-            require_once 'Zend/Gdata/App/Exception.php';
-            throw new Zend_Gdata_App_Exception('You must be authenticated to ' .
-                'use the getFriendActivityForCurrentUser function in Zend_' .
-                'Gdata_YouTube.');
-        }
-        return parent::getFeed(self::FRIEND_ACTIVITY_FEED_URI,
-            'Zend_Gdata_YouTube_ActivityFeed');
-    }
-
-    /**
-     * Retrieve a feed of messages in the currently authenticated user's inbox.
-     *
-     * @throws Zend_Gdata_App_Exception if not logged in.
-     * @return Zend_Gdata_YouTube_InboxFeed|null
-     */
-    public function getInboxFeedForCurrentUser()
-    {
-        if (!$this->isAuthenticated()) {
-            require_once 'Zend/Gdata/App/Exception.php';
-            throw new Zend_Gdata_App_Exception('You must be authenticated to ' .
-                'use the getInboxFeedForCurrentUser function in Zend_' .
-                'Gdata_YouTube.');
-        }
-
-        return parent::getFeed(self::INBOX_FEED_URI,
-            'Zend_Gdata_YouTube_InboxFeed');
-    }
-
-    /**
-     * Send a video message.
-     *
-     * Note: Either a Zend_Gdata_YouTube_VideoEntry or a valid video ID must
-     * be provided.
-     *
-     * @param string $body The body of the message
-     * @param Zend_Gdata_YouTube_VideoEntry (optional) The video entry to send
-     * @param string $videoId The id of the video to send
-     * @param string $recipientUserName The username of the recipient
-     * @throws Zend_Gdata_App_InvalidArgumentException if no valid
-     *         Zend_Gdata_YouTube_VideoEntry or videoId were provided
-     * @return Zend_Gdata_YouTube_InboxEntry|null The
-     *         Zend_Gdata_YouTube_Inbox_Entry representing the sent message.
-     *
-     */
-    public function sendVideoMessage($body, $videoEntry = null,
-        $videoId = null, $recipientUserName)
-    {
-        if (!$videoId && !$videoEntry) {
-            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-            throw new Zend_Gdata_App_InvalidArgumentException(
-                'Expecting either a valid videoID or a videoEntry object in ' .
-                'Zend_Gdata_YouTube->sendVideoMessage().');
-        }
-
-        $messageEntry = new Zend_Gdata_YouTube_InboxEntry();
-
-        if ($this->getMajorProtocolVersion() == null ||
-            $this->getMajorProtocolVersion() == 1) {
-
-            if (!$videoId) {
-                $videoId = $videoEntry->getVideoId();
-            } elseif (strlen($videoId) < 12) {
-                //Append the full URI
-                $videoId = self::VIDEO_URI . '/' . $videoId;
-            }
-
-            $messageEntry->setId($this->newId($videoId));
-            // TODO there seems to be a bug where v1 inbox entries dont
-            // retain their description...
-            $messageEntry->setDescription(
-                new Zend_Gdata_YouTube_Extension_Description($body));
-
-        } else {
-            if (!$videoId) {
-                $videoId = $videoEntry->getVideoId();
-                $videoId = substr($videoId, strrpos($videoId, ':'));
-            }
-            $messageEntry->setId($this->newId($videoId));
-            $messageEntry->setSummary($this->newSummary($body));
-        }
-
-        $insertUrl = 'https://gdata.youtube.com/feeds/api/users/' .
-            $recipientUserName . '/inbox';
-        $response = $this->insertEntry($messageEntry, $insertUrl,
-            'Zend_Gdata_YouTube_InboxEntry');
-        return $response;
-    }
-
-    /**
-     * Post a comment in reply to an existing comment
-     *
-     * @param Zend_Gdata_YouTube_CommentEntry $commentEntry The comment entry
-     *         to reply to
-     * @param string                          $commentText  The text of the
-		 *         comment to post
-     * @return Zend_Gdata_YouTube_CommentEntry the posted comment
-     */
-    public function replyToCommentEntry($commentEntry, $commentText)
-    {
-        $newComment = $this->newCommentEntry();
-        $newComment->content = $this->newContent()->setText($commentText);
-        $commentId = $commentEntry->getId();
-        $commentIdArray = explode(':', $commentId);
-
-        // create a new link element
-        $inReplyToLinkHref = self::VIDEO_URI . '/' . $commentIdArray[3] .
-            '/comments/' . $commentIdArray[5];
-        $inReplyToLink = $this->newLink($inReplyToLinkHref,
-            self::IN_REPLY_TO_SCHEME, $type="application/atom+xml");
-        $links = $newComment->getLink();
-        $links[] = $inReplyToLink;
-        $newComment->setLink($links);
-        $commentFeedPostUrl = self::VIDEO_URI . '/' . $commentIdArray[3] .
-            '/comments';
-        return $this->insertEntry($newComment,
-            $commentFeedPostUrl, 'Zend_Gdata_YouTube_CommentEntry');
-    }
-
-}

+ 0 - 232
library/Zend/Gdata/YouTube/ActivityEntry.php

@@ -1,232 +0,0 @@
-<?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 Health
- * @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_YouTube_Extension_VideoId
- */
-require_once 'Zend/Gdata/YouTube/Extension/VideoId.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Username
- */
-require_once 'Zend/Gdata/YouTube/Extension/Username.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Rating
- */
-require_once 'Zend/Gdata/Extension/Rating.php';
-
-/**
- * A concrete class for working with YouTube user activity entries.
- *
- * @link http://code.google.com/apis/youtube/
- *
- * @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_ActivityEntry extends Zend_Gdata_Entry
-{
-    const ACTIVITY_CATEGORY_SCHEME =
-        'http://gdata.youtube.com/schemas/2007/userevents.cat';
-
-    /**
-     * The classname for individual user activity entry elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_ActivityEntry';
-
-    /**
-     * The ID of the video that was part of the activity
-     *
-     * @var Zend_Gdata_YouTube_VideoId
-     */
-    protected $_videoId = null;
-
-    /**
-     * The username for the user that was part of the activity
-     *
-     * @var Zend_Gdata_YouTube_Username
-     */
-    protected $_username = null;
-
-    /**
-     * The rating element that was part of the activity
-     *
-     * @var Zend_Gdata_Extension_Rating
-     */
-    protected $_rating = null;
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_ActivityEntry object.
-     * @param DOMElement $element (optional) The DOMElement on which to
-     * base this object.
-     */
-    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 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->_videoId !== null) {
-          $element->appendChild($this->_videoId->getDOM(
-              $element->ownerDocument));
-        }
-        if ($this->_username !== null) {
-          $element->appendChild($this->_username->getDOM(
-              $element->ownerDocument));
-        }
-        if ($this->_rating !== null) {
-          $element->appendChild($this->_rating->getDOM(
-              $element->ownerDocument));
-        }
-        return $element;
-    }
-
-    /**
-     * Creates individual Entry objects of the appropriate type and
-     * stores them as members of this entry 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') . ':' . 'videoid':
-                $videoId = new Zend_Gdata_YouTube_Extension_VideoId();
-                $videoId->transferFromDOM($child);
-                $this->_videoId = $videoId;
-                break;
-            case $this->lookupNamespace('yt') . ':' . 'username':
-                $username = new Zend_Gdata_YouTube_Extension_Username();
-                $username->transferFromDOM($child);
-                $this->_username = $username;
-                break;
-            case $this->lookupNamespace('gd') . ':' . 'rating':
-                $rating = new Zend_Gdata_Extension_Rating();
-                $rating->transferFromDOM($child);
-                $this->_rating = $rating;
-                break;
-            default:
-                parent::takeChildFromDOM($child);
-                break;
-        }
-    }
-
-    /**
-     * Returns the video ID for this activity entry.
-     *
-     * @return null|Zend_Gdata_YouTube_Extension_VideoId
-     */
-    public function getVideoId()
-    {
-        return $this->_videoId;
-    }
-
-    /**
-     * Returns the username for this activity entry.
-     *
-     * @return null|Zend_Gdata_YouTube_Extension_Username
-     */
-    public function getUsername()
-    {
-        return $this->_username;
-    }
-
-    /**
-     * Returns the rating for this activity entry.
-     *
-     * @return null|Zend_Gdata_YouTube_Extension_Rating
-     */
-    public function getRating()
-    {
-        return $this->_rating;
-    }
-
-    /**
-     * Return the value of the rating for this video entry.
-     *
-     * Convenience method to save needless typing.
-     *
-     * @return integer|null The value of the rating that was created, if found.
-     */
-    public function getRatingValue()
-    {
-        $rating = $this->_rating;
-        if ($rating) {
-            return $rating->getValue();
-        }
-        return null;
-    }
-
-    /**
-     * Return the activity type that was performed.
-     *
-     * Convenience method that inspects category where scheme is
-     * http://gdata.youtube.com/schemas/2007/userevents.cat.
-     *
-     * @return string|null The activity category if found.
-     */
-    public function getActivityType()
-    {
-        $categories = $this->getCategory();
-        foreach($categories as $category) {
-            if ($category->getScheme() == self::ACTIVITY_CATEGORY_SCHEME) {
-                return $category->getTerm();
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Convenience method to quickly get access to the author of the activity
-     *
-     * @return string The author of the activity
-     */
-    public function getAuthorName()
-    {
-        $authors = $this->getAuthor();
-        return $authors[0]->getName()->getText();
-    }
-}

+ 0 - 66
library/Zend/Gdata/YouTube/ActivityFeed.php

@@ -1,66 +0,0 @@
-<?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_Feed
- */
-require_once 'Zend/Gdata/Feed.php';
-
-/**
- * @see Zend_Gdata_YouTube_ActivityEntry
- */
-require_once 'Zend/Gdata/YouTube/ActivityEntry.php';
-
-/**
- * A feed of user activity entries for YouTube
- *
- * @link http://code.google.com/apis/youtube/
- * @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_ActivityFeed extends Zend_Gdata_Feed
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_ActivityEntry';
-
-    /**
-     * Creates an Activity feed, representing a list of activity entries
-     *
-     * @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);
-    }
-
-}

+ 0 - 59
library/Zend/Gdata/YouTube/CommentEntry.php

@@ -1,59 +0,0 @@
-<?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_Media_Feed
- */
-require_once 'Zend/Gdata/Media/Feed.php';
-
-/**
- * The YouTube comments 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_CommentEntry extends Zend_Gdata_Entry
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_CommentEntry';
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_CommentEntry object.
-     * @param DOMElement $element (optional) The DOMElement on which to
-     * base this object.
-     */
-    public function __construct($element = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct($element);
-    }
-
-}

+ 0 - 66
library/Zend/Gdata/YouTube/CommentFeed.php

@@ -1,66 +0,0 @@
-<?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_feed
- */
-require_once 'Zend/Gdata/Feed.php';
-
-/**
- * @see Zend_Gdata_YouTube_CommentEntry
- */
-require_once 'Zend/Gdata/YouTube/CommentEntry.php';
-
-/**
- * The YouTube comments flavor of an Atom Feed
- *
- * @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_CommentFeed extends Zend_Gdata_Feed
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_CommentEntry';
-
-    /**
-     * Constructs a new YouTube Comment Feed object, to represent
-     * a feed of comments for an individual video
-     *
-     * @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);
-    }
-
-}

+ 0 - 136
library/Zend/Gdata/YouTube/ContactEntry.php

@@ -1,136 +0,0 @@
-<?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_YouTube_UserProfileEntry
- */
-require_once 'Zend/Gdata/YouTube/UserProfileEntry.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Status
- */
-require_once 'Zend/Gdata/YouTube/Extension/Status.php';
-
-/**
- * The YouTube contacts flavor of an Atom Entry with media support
- * Represents a an individual contact
- *
- * @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_ContactEntry extends Zend_Gdata_YouTube_UserProfileEntry
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_ContactEntry';
-
-    /**
-     * Status of the user as a contact
-     *
-     * @var string
-     */
-    protected $_status = null;
-
-    /**
-     * Constructs a new Contact Entry object, to represent
-     * an individual contact for a user
-     *
-     * @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->_status != null) {
-            $element->appendChild($this->_status->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') . ':' . 'status':
-            $status = new Zend_Gdata_YouTube_Extension_Status();
-            $status->transferFromDOM($child);
-            $this->_status = $status;
-            break;
-        default:
-            parent::takeChildFromDOM($child);
-            break;
-        }
-    }
-
-    /**
-     * Sets the status
-     *
-     * @param Zend_Gdata_YouTube_Extension_Status $status The status
-     * @return Zend_Gdata_YouTube_ContactEntry Provides a fluent interface
-     */
-    public function setStatus($status = null)
-    {
-        $this->_status = $status;
-        return $this;
-    }
-
-    /**
-     * Returns the status
-     *
-     * @return Zend_Gdata_YouTube_Extension_Status  The status
-     */
-    public function getStatus()
-    {
-        return $this->_status;
-    }
-
-}

+ 0 - 68
library/Zend/Gdata/YouTube/ContactFeed.php

@@ -1,68 +0,0 @@
-<?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_Media_Feed
- */
-require_once 'Zend/Gdata/Media/Feed.php';
-
-/**
- * @see Zend_Gdata_YouTube_ContactEntry
- */
-require_once 'Zend/Gdata/YouTube/ContactEntry.php';
-
-/**
- * The YouTube contacts flavor of an Atom Feed with media support
- * Represents a list of individual contacts, where each contained entry is
- * a contact.
- *
- * @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_ContactFeed extends Zend_Gdata_Media_Feed
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_ContactEntry';
-
-    /**
-     * Constructs a new YouTube Contact Feed object, to represent
-     * a feed of contacts for a user
-     *
-     * @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);
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/AboutMe.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:aboutMe element
- *
- * @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_Extension_AboutMe extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'aboutMe';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Age.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:age element
- *
- * @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_Extension_Age extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'age';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Books.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:books element
- *
- * @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_Extension_Books extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'books';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Company.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:company element
- *
- * @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_Extension_Company extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'company';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 133
library/Zend/Gdata/YouTube/Extension/Control.php

@@ -1,133 +0,0 @@
-<?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_App_Extension_Control
- */
-require_once 'Zend/Gdata/App/Extension/Control.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_State
- */
-require_once 'Zend/Gdata/YouTube/Extension/State.php';
-
-
-/**
- * Specialized Control class for use with YouTube. Enables use of yt extension elements.
- *
- * @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_Extension_Control extends Zend_Gdata_App_Extension_Control
-{
-
-    protected $_state = null;
-
-    /**
-     * Constructs a new Zend_Gdata_Calendar_Extension_Control object.
-     * @see Zend_Gdata_App_Extension_Control#__construct
-     * @param Zend_Gdata_App_Extension_Draft $draft
-     * @param Zend_Gdata_YouTube_Extension_State $state
-     */
-    public function __construct($draft = null, $state = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct($draft);
-        $this->_state = $state;
-    }
-
-    /**
-     * 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->_state != null) {
-            $element->appendChild($this->_state->getDOM($element->ownerDocument));
-        }
-        return $element;
-    }
-
-    /**
-     * Creates individual Entry objects of the appropriate type and
-     * stores them as members of this entry 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') . ':' . 'state':
-            $state = new Zend_Gdata_YouTube_Extension_State();
-            $state->transferFromDOM($child);
-            $this->_state = $state;
-            break;
-        default:
-            parent::takeChildFromDOM($child);
-            break;
-        }
-    }
-
-    /**
-     * Get the value for this element's state attribute.
-     *
-     * @return Zend_Gdata_YouTube_Extension_State The state element.
-     */
-    public function getState()
-    {
-        return $this->_state;
-    }
-
-    /**
-     * Set the value for this element's state attribute.
-     *
-     * @param Zend_Gdata_YouTube_Extension_State $value The desired value for this attribute.
-     * @return Zend_YouTube_Extension_Control The element being modified.
-     */
-    public function setState($value)
-    {
-        $this->_state = $value;
-        return $this;
-    }
-
-    /**
-    * Get the value of this element's state attribute.
-    *
-    * @return string The state's text value
-    */
-    public function getStateValue()
-    {
-      return $this->getState()->getText();
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/CountHint.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:countHint element
- *
- * @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_Extension_CountHint extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'countHint';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Description.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:description element
- *
- * @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_Extension_Description extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'description';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 126
library/Zend/Gdata/YouTube/Extension/Duration.php

@@ -1,126 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:duration element used by the YouTube data API
- *
- * @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_Extension_Duration extends Zend_Gdata_Extension
-{
-
-    protected $_rootNamespace = 'yt';
-    protected $_rootElement = 'duration';
-    protected $_seconds = null;
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_Extension_Duration object.
-     * @param bool $seconds(optional) The seconds value of the element.
-     */
-    public function __construct($seconds = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_seconds = $seconds;
-    }
-
-    /**
-     * 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->_seconds !== null) {
-            $element->setAttribute('seconds', $this->_seconds);
-        }
-        return $element;
-    }
-
-    /**
-     * Given a DOMNode representing an attribute, tries to map the data into
-     * instance members.  If no mapping is defined, the name and valueare
-     * stored in an array.
-     *
-     * @param DOMNode $attribute The DOMNode attribute needed to be handled
-     */
-    protected function takeAttributeFromDOM($attribute)
-    {
-        switch ($attribute->localName) {
-        case 'seconds':
-            $this->_seconds = $attribute->nodeValue;
-            break;
-        default:
-            parent::takeAttributeFromDOM($attribute);
-        }
-    }
-
-    /**
-     * Get the value for this element's seconds attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getSeconds()
-    {
-        return $this->_seconds;
-    }
-
-    /**
-     * Set the value for this element's seconds attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_Duration The element being modified.
-     */
-    public function setSeconds($value)
-    {
-        $this->_seconds = $value;
-        return $this;
-    }
-
-    /**
-     * Magic toString method allows using this directly via echo
-     * Works best in PHP >= 4.2.0
-     *
-     * @return string The duration in seconds
-     */
-    public function __toString()
-    {
-        return $this->_seconds;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/FirstName.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:firstName element
- *
- * @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_Extension_FirstName extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'firstName';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Gender.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:gender element
- *
- * @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_Extension_Gender extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'gender';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Hobbies.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:hobbies element
- *
- * @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_Extension_Hobbies extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'hobbies';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Hometown.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:hometown element
- *
- * @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_Extension_Hometown extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'hometown';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/LastName.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:lastName element
- *
- * @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_Extension_LastName extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'lastName';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 133
library/Zend/Gdata/YouTube/Extension/Link.php

@@ -1,133 +0,0 @@
-<?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_App_Extension_Link
- */
-require_once 'Zend/Gdata/App/Extension/Link.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Token
- */
-require_once 'Zend/Gdata/YouTube/Extension/Token.php';
-
-
-/**
- * Specialized Link class for use with YouTube. Enables use of yt extension elements.
- *
- * @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_Extension_Link extends Zend_Gdata_App_Extension_Link
-{
-
-    protected $_token = null;
-
-    /**
-     * Constructs a new Zend_Gdata_Calendar_Extension_Link object.
-     * @see Zend_Gdata_App_Extension_Link#__construct
-     * @param Zend_Gdata_YouTube_Extension_Token $token
-     */
-    public function __construct($href = null, $rel = null, $type = null,
-            $hrefLang = null, $title = null, $length = null, $token = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct($href, $rel, $type, $hrefLang, $title, $length);
-        $this->_token = $token;
-    }
-
-    /**
-     * 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->_token != null) {
-            $element->appendChild($this->_token->getDOM($element->ownerDocument));
-        }
-        return $element;
-    }
-
-    /**
-     * Creates individual Entry objects of the appropriate type and
-     * stores them as members of this entry 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') . ':' . 'token':
-            $token = new Zend_Gdata_YouTube_Extension_Token();
-            $token->transferFromDOM($child);
-            $this->_token = $token;
-            break;
-        default:
-            parent::takeChildFromDOM($child);
-            break;
-        }
-    }
-
-    /**
-     * Get the value for this element's token attribute.
-     *
-     * @return Zend_Gdata_YouTube_Extension_Token The token element.
-     */
-    public function getToken()
-    {
-        return $this->_token;
-    }
-
-    /**
-     * Set the value for this element's token attribute.
-     *
-     * @param Zend_Gdata_YouTube_Extension_Token $value The desired value for this attribute.
-     * @return Zend_YouTube_Extension_Link The element being modified.
-     */
-    public function setToken($value)
-    {
-        $this->_token = $value;
-        return $this;
-    }
-
-    /**
-    * Get the value of this element's token attribute.
-    *
-    * @return string The token's text value
-    */
-    public function getTokenValue()
-    {
-      return $this->getToken()->getText();
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Location.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:location element
- *
- * @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_Extension_Location extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'location';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 120
library/Zend/Gdata/YouTube/Extension/MediaContent.php

@@ -1,120 +0,0 @@
-<?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_Media_Extension_MediaContent
- */
-require_once 'Zend/Gdata/Media/Extension/MediaContent.php';
-
-/**
- * Represents the media:content element of Media RSS.
- * Represents media objects.  Multiple media objects representing
- * the same content can be represented using a
- * media:group (Zend_Gdata_Media_Extension_MediaGroup) element.
- *
- * @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_Extension_MediaContent extends Zend_Gdata_Media_Extension_MediaContent
-{
-    protected $_rootElement = 'content';
-    protected $_rootNamespace = 'media';
-
-    /*
-     * Format of the video
-     * Optional.
-     *
-     * @var int
-     */
-    protected $_format = null;
-
-
-    function __construct() {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-    }
-
-    /**
-     * 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->_format!= null) {
-            $element->setAttributeNS($this->lookupNamespace('yt'), 'yt:format', $this->_format);
-        }
-        return $element;
-    }
-
-    /**
-     * Given a DOMNode representing an attribute, tries to map the data into
-     * instance members.  If no mapping is defined, the name and value are
-     * stored in an array.
-     *
-     * @param DOMNode $attribute The DOMNode attribute needed to be handled
-     */
-    protected function takeAttributeFromDOM($attribute)
-    {
-        $absoluteAttrName = $attribute->namespaceURI . ':' . $attribute->localName;
-        if ($absoluteAttrName == $this->lookupNamespace('yt') . ':' . 'format') {
-            $this->_format = $attribute->nodeValue;
-        } else {
-            parent::takeAttributeFromDOM($attribute);
-        }
-    }
-
-    /**
-     * Returns the format of the media
-     * Optional.
-     *
-     * @return int  The format of the media
-     */
-    public function getFormat()
-    {
-        return $this->_format;
-    }
-
-    /**
-     * Sets the format of the media
-     *
-     * @param int $value    Format of the media
-     * @return Zend_Gdata_YouTube_Extension_MediaContent  Provides a fluent interface
-     *
-     */
-    public function setFormat($value)
-    {
-        $this->_format = $value;
-        return $this;
-    }
-
-}

+ 0 - 189
library/Zend/Gdata/YouTube/Extension/MediaCredit.php

@@ -1,189 +0,0 @@
-<?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 Media
- * @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_App_Extension
- */
-require_once 'Zend/Gdata/App/Extension.php';
-
-/**
- * Represents the YouTube specific media:credit element
- *
- * @category   Zend
- * @package    Zend_Gdata
- * @subpackage Media
- * @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_Extension_MediaCredit extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'credit';
-    protected $_rootNamespace = 'media';
-
-    /**
-     * @var string
-     */
-    protected $_role = null;
-
-    /**
-     * @var string
-     */
-    protected $_scheme = null;
-
-    /**
-     * Represents the value of the yt:type attribute.
-     *
-     * Set to 'partner' if the uploader of this video is a YouTube
-     * partner.
-     *
-     * @var string
-     */
-    protected $_yttype = null;
-
-    /**
-     * Creates an individual MediaCredit object.
-     *
-     * @param string $text
-     * @param string $role
-     * @param string $scheme
-     */
-    public function __construct($text = null, $role = null,  $scheme = null,
-        $yttype = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-        $this->_role = $role;
-        $this->_scheme = $scheme;
-        $this->_yttype = $yttype;
-    }
-
-    /**
-     * 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->_role !== null) {
-            $element->setAttribute('role', $this->_role);
-        }
-        if ($this->_scheme !== null) {
-            $element->setAttribute('scheme', $this->_scheme);
-        }
-        if ($this->_yttype !== null) {
-            $element->setAttributeNS('http://gdata.youtube.com/schemas/2007',
-                'yt:type', $this->_yttype);
-        }
-        return $element;
-    }
-
-    /**
-     * Given a DOMNode representing an attribute, tries to map the data into
-     * instance members.  If no mapping is defined, the name and value are
-     * stored in an array.
-     *
-     * @param DOMNode $attribute The DOMNode attribute needed to be handled
-     */
-    protected function takeAttributeFromDOM($attribute)
-    {
-        switch ($attribute->localName) {
-            case 'role':
-                $this->_role = $attribute->nodeValue;
-                break;
-            case 'scheme':
-                $this->_scheme = $attribute->nodeValue;
-                break;
-            case 'type':
-                $this->_yttype = $attribute->nodeValue;
-                break;
-            default:
-                parent::takeAttributeFromDOM($attribute);
-        }
-    }
-
-    /**
-     * @return string
-     */
-    public function getRole()
-    {
-        return $this->_role;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Media_Extension_MediaCredit Provides a fluent
-     *         interface
-     */
-    public function setRole($value)
-    {
-        $this->_role = $value;
-        return $this;
-    }
-
-    /**
-     * @return string
-     */
-    public function getScheme()
-    {
-        return $this->_scheme;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Media_Extension_MediaCredit Provides a fluent
-     *         interface
-     */
-    public function setScheme($value)
-    {
-        $this->_scheme = $value;
-        return $this;
-    }
-
-    /**
-     * @return string
-     */
-    public function getYTtype()
-    {
-        return $this->_yttype;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Media_Extension_MediaCredit Provides a fluent
-     *         interface
-     */
-    public function setYTtype($value)
-    {
-        $this->_yttype = $value;
-        return $this;
-    }
-
-}

+ 0 - 336
library/Zend/Gdata/YouTube/Extension/MediaGroup.php

@@ -1,336 +0,0 @@
-<?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_Media_Extension_MediaGroup
- */
-require_once 'Zend/Gdata/Media/Extension/MediaGroup.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_MediaContent
- */
-require_once 'Zend/Gdata/YouTube/Extension/MediaContent.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Duration
- */
-require_once 'Zend/Gdata/YouTube/Extension/Duration.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_MediaRating
- */
-require_once 'Zend/Gdata/YouTube/Extension/MediaRating.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_MediaCredit
- */
-require_once 'Zend/Gdata/YouTube/Extension/MediaCredit.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Private
- */
-require_once 'Zend/Gdata/YouTube/Extension/Private.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_VideoId
- */
-require_once 'Zend/Gdata/YouTube/Extension/VideoId.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Uploaded
- */
-require_once 'Zend/Gdata/YouTube/Extension/Uploaded.php';
-
-/**
- * This class represents the media:group element of Media RSS.
- * It allows the grouping of media:content elements that are
- * different representations of the same content.  When it exists,
- * it is a child of an Entry (Atom) or Item (RSS).
- *
- * @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_Extension_MediaGroup extends Zend_Gdata_Media_Extension_MediaGroup
-{
-
-    protected $_rootElement = 'group';
-    protected $_rootNamespace = 'media';
-
-    /**
-     * @var Zend_Gdata_YouTube_Extension_Duration
-     */
-    protected $_duration = null;
-
-    /**
-     * @var Zend_Gdata_YouTube_Extension_Private
-     */
-    protected $_private = null;
-
-    /**
-     * @var Zend_Gdata_YouTube_Extension_VideoId
-     */
-    protected $_videoid = null;
-
-    /**
-     * @var Zend_Gdata_YouTube_Extension_MediaRating
-     */
-    protected $_mediarating = null;
-
-    /**
-     * @var Zend_Gdata_YouTube_Extension_MediaCredit
-     */
-    protected $_mediacredit = null;
-
-    /**
-     * @var Zend_Gdata_YouTube_Extension_Uploaded
-     */
-    protected $_uploaded = null;
-
-    public function __construct($element = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct($element);
-    }
-
-    public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
-    {
-        $element = parent::getDOM($doc, $majorVersion, $minorVersion);
-        if ($this->_duration !== null) {
-            $element->appendChild(
-                $this->_duration->getDOM($element->ownerDocument));
-        }
-        if ($this->_private !== null) {
-            $element->appendChild(
-                $this->_private->getDOM($element->ownerDocument));
-        }
-        if ($this->_videoid != null) {
-            $element->appendChild(
-                $this->_videoid->getDOM($element->ownerDocument));
-        }
-        if ($this->_uploaded != null) {
-            $element->appendChild(
-                $this->_uploaded->getDOM($element->ownerDocument));
-        }
-        if ($this->_mediacredit != null) {
-            $element->appendChild(
-                $this->_mediacredit->getDOM($element->ownerDocument));
-        }
-        if ($this->_mediarating != null) {
-            $element->appendChild(
-                $this->_mediarating->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('media') . ':' . 'content':
-                $content = new Zend_Gdata_YouTube_Extension_MediaContent();
-                $content->transferFromDOM($child);
-                $this->_content[] = $content;
-                break;
-            case $this->lookupNamespace('media') . ':' . 'rating':
-                $mediarating = new Zend_Gdata_YouTube_Extension_MediaRating();
-                $mediarating->transferFromDOM($child);
-                $this->_mediarating = $mediarating;
-                break;
-            case $this->lookupNamespace('media') . ':' . 'credit':
-                $mediacredit = new Zend_Gdata_YouTube_Extension_MediaCredit();
-                $mediacredit->transferFromDOM($child);
-                $this->_mediacredit = $mediacredit;
-                break;
-            case $this->lookupNamespace('yt') . ':' . 'duration':
-                $duration = new Zend_Gdata_YouTube_Extension_Duration();
-                $duration->transferFromDOM($child);
-                $this->_duration = $duration;
-                break;
-            case $this->lookupNamespace('yt') . ':' . 'private':
-                $private = new Zend_Gdata_YouTube_Extension_Private();
-                $private->transferFromDOM($child);
-                $this->_private = $private;
-                break;
-            case $this->lookupNamespace('yt') . ':' . 'videoid':
-                $videoid = new Zend_Gdata_YouTube_Extension_VideoId();
-                $videoid ->transferFromDOM($child);
-                $this->_videoid = $videoid;
-                break;
-            case $this->lookupNamespace('yt') . ':' . 'uploaded':
-                $uploaded = new Zend_Gdata_YouTube_Extension_Uploaded();
-                $uploaded ->transferFromDOM($child);
-                $this->_uploaded = $uploaded;
-                break;
-        default:
-            parent::takeChildFromDOM($child);
-            break;
-        }
-    }
-
-    /**
-     * Returns the duration value of this element
-     *
-     * @return Zend_Gdata_YouTube_Extension_Duration
-     */
-    public function getDuration()
-    {
-        return $this->_duration;
-    }
-
-    /**
-     * Sets the duration value of this element
-     *
-     * @param Zend_Gdata_YouTube_Extension_Duration $value The duration value
-     * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
-     *         interface
-     */
-    public function setDuration($value)
-    {
-        $this->_duration = $value;
-        return $this;
-    }
-
-    /**
-     * Returns the videoid value of this element
-     *
-     * @return Zend_Gdata_YouTube_Extension_VideoId
-     */
-    public function getVideoId()
-    {
-        return $this->_videoid;
-    }
-
-    /**
-     * Sets the videoid value of this element
-     *
-     * @param Zend_Gdata_YouTube_Extension_VideoId $value The video id value
-     * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
-     *         interface
-     */
-    public function setVideoId($value)
-    {
-        $this->_videoid = $value;
-        return $this;
-    }
-
-    /**
-     * Returns the yt:uploaded element
-     *
-     * @return Zend_Gdata_YouTube_Extension_Uploaded
-     */
-    public function getUploaded()
-    {
-        return $this->_uploaded;
-    }
-
-    /**
-     * Sets the yt:uploaded element
-     *
-     * @param Zend_Gdata_YouTube_Extension_Uploaded $value The uploaded value
-     * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
-     *         interface
-     */
-    public function setUploaded($value)
-    {
-        $this->_uploaded = $value;
-        return $this;
-    }
-
-    /**
-     * Returns the private value of this element
-     *
-     * @return Zend_Gdata_YouTube_Extension_Private
-     */
-    public function getPrivate()
-    {
-        return $this->_private;
-    }
-
-    /**
-     * Sets the private value of this element
-     *
-     * @param Zend_Gdata_YouTube_Extension_Private $value The private value
-     * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
-     *         interface
-     */
-    public function setPrivate($value)
-    {
-        $this->_private = $value;
-        return $this;
-    }
-
-    /**
-     * Returns the rating value of this element
-     *
-     * @return Zend_Gdata_YouTube_Extension_MediaRating
-     */
-    public function getMediaRating()
-    {
-        return $this->_mediarating;
-    }
-
-    /**
-     * Sets the media:rating value of this element
-     *
-     * @param Zend_Gdata_YouTube_Extension_MediaRating $value The rating element
-     * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
-     *         interface
-     */
-    public function setMediaRating($value)
-    {
-        $this->_mediarating = $value;
-        return $this;
-    }
-
-    /**
-     * Returns the media:credit value of this element
-     *
-     * @return Zend_Gdata_YouTube_Extension_MediaCredit
-     */
-    public function getMediaCredit()
-    {
-        return $this->_mediacredit;
-    }
-
-    /**
-     * Sets the media:credit value of this element
-     *
-     * @param Zend_Gdata_YouTube_Extension_MediaCredit $value The credit element
-     * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
-     *         interface
-     */
-    public function setMediaCredit($value)
-    {
-        $this->_mediacredit = $value;
-        return $this;
-    }
-}

+ 0 - 150
library/Zend/Gdata/YouTube/Extension/MediaRating.php

@@ -1,150 +0,0 @@
-<?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 Media
- * @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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the media:rating element specific to YouTube.
- *
- * @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_Extension_MediaRating extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'rating';
-    protected $_rootNamespace = 'media';
-
-    /**
-     * @var string
-     */
-    protected $_scheme = null;
-
-    /**
-     * @var string
-     */
-    protected $_country = null;
-
-    /**
-     * Constructs a new MediaRating element
-     *
-     * @param string $text
-     * @param string $scheme
-     * @param string $country
-     */
-    public function __construct($text = null, $scheme = null, $country = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
-        parent::__construct();
-        $this->_scheme = $scheme;
-        $this->_country = $country;
-        $this->_text = $text;
-    }
-
-    /**
-     * 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->_scheme !== null) {
-            $element->setAttribute('scheme', $this->_scheme);
-        }
-        if ($this->_country != null) {
-            $element->setAttribute('country', $this->_country);
-        }
-        return $element;
-    }
-
-    /**
-     * Given a DOMNode representing an attribute, tries to map the data into
-     * instance members.  If no mapping is defined, the name and value are
-     * stored in an array.
-     *
-     * @param DOMNode $attribute The DOMNode attribute needed to be handled
-     */
-    protected function takeAttributeFromDOM($attribute)
-    {
-        switch ($attribute->localName) {
-        case 'scheme':
-            $this->_scheme = $attribute->nodeValue;
-            break;
-        case 'country':
-            $this->_country = $attribute->nodeValue;
-            break;
-        default:
-            parent::takeAttributeFromDOM($attribute);
-        }
-    }
-
-    /**
-     * @return string
-     */
-    public function getScheme()
-    {
-        return $this->_scheme;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_YouTube_Extension_MediaRating Provides a fluent interface
-     */
-    public function setScheme($value)
-    {
-        $this->_scheme = $value;
-        return $this;
-    }
-
-    /**
-     * @return string
-     */
-    public function getCountry()
-    {
-        return $this->_country;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_YouTube_Extension_MediaRating Provides a fluent interface
-     */
-    public function setCountry($value)
-    {
-        $this->_country = $value;
-        return $this;
-    }
-
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Movies.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:movies element
- *
- * @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_Extension_Movies extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'movies';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Music.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:music element
- *
- * @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_Extension_Music extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'music';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 54
library/Zend/Gdata/YouTube/Extension/NoEmbed.php

@@ -1,54 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:noembed element used by the YouTube data API
- *
- * @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_Extension_NoEmbed extends Zend_Gdata_Extension
-{
-
-    protected $_rootNamespace = 'yt';
-    protected $_rootElement = 'noembed';
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_Extension_VideoShare object.
-     * @param bool $enabled(optional) The enabled value of the element.
-     */
-    public function __construct($enabled = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Occupation.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:occupation element
- *
- * @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_Extension_Occupation extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'occupation';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/PlaylistId.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:playlistId element
- *
- * @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_Extension_PlaylistId extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'playlistId';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/PlaylistTitle.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:playlistTitle element
- *
- * @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_Extension_PlaylistTitle extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'playlistTitle';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 90
library/Zend/Gdata/YouTube/Extension/Position.php

@@ -1,90 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Data model class to represent a playlist item's position in the list (yt:position)
- *
- * @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_Extension_Position extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'position';
-    protected $_rootNamespace = 'yt';
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_Extension_Position object.
-     *
-     * @param string $value (optional) The 1-based position in the playlist
-     */
-    public function __construct($value = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $value;
-    }
-
-    /**
-     * Get the value for the position in the playlist
-     *
-     * @return int The 1-based position in the playlist
-     */
-    public function getValue()
-    {
-        return $this->_text;
-    }
-
-    /**
-     * Set the value for the position in the playlist
-     *
-     * @param int $value The 1-based position in the playlist
-     * @return Zend_Gdata_Extension_Visibility The element being modified
-     */
-    public function setValue($value)
-    {
-        $this->_text = $value;
-        return $this;
-    }
-
-    /**
-     * Magic toString method allows using this directly via echo
-     * Works best in PHP >= 4.2.0
-     *
-     * @return string
-     */
-    public function __toString()
-    {
-        return $this->getValue();
-    }
-
-}
-

+ 0 - 81
library/Zend/Gdata/YouTube/Extension/Private.php

@@ -1,81 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:private element used by the YouTube data API
- *
- * @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_Extension_Private extends Zend_Gdata_Extension
-{
-
-    protected $_rootNamespace = 'yt';
-    protected $_rootElement = 'private';
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_Extension_Private object.
-     */
-    public function __construct()
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-    }
-
-    /**
-     * 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);
-        return $element;
-    }
-
-    /**
-     * Given a DOMNode representing an attribute, tries to map the data into
-     * instance members.  If no mapping is defined, the name and valueare
-     * stored in an array.
-     *
-     * @param DOMNode $attribute The DOMNode attribute needed to be handled
-     */
-    protected function takeAttributeFromDOM($attribute)
-    {
-        parent::takeAttributeFromDOM($attribute);
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/QueryString.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:queryString element
- *
- * @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_Extension_QueryString extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'queryString';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 124
library/Zend/Gdata/YouTube/Extension/Racy.php

@@ -1,124 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:racy element used by the YouTube data API
- *
- * @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_Extension_Racy extends Zend_Gdata_Extension
-{
-
-    protected $_rootNamespace = 'yt';
-    protected $_rootElement = 'racy';
-    protected $_state = null;
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_Extension_Racy object.
-     * @param bool $state(optional) The state value of the element.
-     */
-    public function __construct($state = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_state = $state;
-    }
-
-    /**
-     * 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->_state !== null) {
-            $element->setAttribute('state', $this->_state);
-        }
-        return $element;
-    }
-
-    /**
-     * Given a DOMNode representing an attribute, tries to map the data into
-     * instance members.  If no mapping is defined, the name and value are
-     * stored in an array.
-     *
-     * @param DOMNode $attribute The DOMNode attribute needed to be handled
-     */
-    protected function takeAttributeFromDOM($attribute)
-    {
-        switch ($attribute->localName) {
-        case 'state':
-            $this->_state = $attribute->nodeValue;
-            break;
-        default:
-            parent::takeAttributeFromDOM($attribute);
-        }
-    }
-
-    /**
-     * Get the value for this element's state attribute.
-     *
-     * @return bool The value associated with this attribute.
-     */
-    public function getState()
-    {
-        return $this->_state;
-    }
-
-    /**
-     * Set the value for this element's state attribute.
-     *
-     * @param bool $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_Racy The element being modified.
-     */
-    public function setState($value)
-    {
-        $this->_state = $value;
-        return $this;
-    }
-
-    /**
-     * Magic toString method allows using this directly via echo
-     * Works best in PHP >= 4.2.0
-     */
-    public function __toString()
-    {
-        return $this->_state;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Recorded.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:recorded element
- *
- * @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_Extension_Recorded extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'recorded';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Relationship.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:relationship element
- *
- * @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_Extension_Relationship extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'relationship';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/ReleaseDate.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:releaseDate element
- *
- * @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_Extension_ReleaseDate extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'releaseDate';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/School.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:school element
- *
- * @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_Extension_School extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'school';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 193
library/Zend/Gdata/YouTube/Extension/State.php

@@ -1,193 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:state element used by the YouTube data API
- *
- * @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_Extension_State extends Zend_Gdata_Extension
-{
-
-    protected $_rootNamespace = 'yt';
-    protected $_rootElement = 'state';
-    protected $_name = null;
-    protected $_reasonCode = null;
-    protected $_helpUrl = null;
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_Extension_State object.
-     *
-     * @param string $explanation(optional) The explanation of this state
-     * @param string $name(optional) The name value
-     * @param string $reasonCode(optional) The reasonCode value
-     * @param string $helpUrl(optional) The helpUrl value
-     */
-    public function __construct($explanation = null, $name = null,
-                                $reasonCode = null, $helpUrl = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $explanation;
-        $this->_name = $name;
-        $this->_reasonCode = $reasonCode;
-        $this->_helpUrl = $reasonCode;
-    }
-
-    /**
-     * 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->_name !== null) {
-            $element->setAttribute('name', $this->_name);
-        }
-        if ($this->_reasonCode !== null) {
-            $element->setAttribute('reasonCode', $this->_reasonCode);
-        }
-        if ($this->_helpUrl !== null) {
-            $element->setAttribute('helpUrl', $this->_helpUrl);
-        }
-        return $element;
-    }
-
-    /**
-     * Given a DOMNode representing an attribute, tries to map the data into
-     * instance members.  If no mapping is defined, the name and valueare
-     * stored in an array.
-     * TODO: Convert attributes to proper types
-     *
-     * @param DOMNode $attribute The DOMNode attribute needed to be handled
-     */
-    protected function takeAttributeFromDOM($attribute)
-    {
-        switch ($attribute->localName) {
-        case 'name':
-            $this->_name = $attribute->nodeValue;
-            break;
-        case 'reasonCode':
-            $this->_reasonCode = $attribute->nodeValue;
-            break;
-        case 'helpUrl':
-            $this->_helpUrl = $attribute->nodeValue;
-            break;
-        default:
-            parent::takeAttributeFromDOM($attribute);
-        }
-    }
-
-    /**
-     * Get the value for this element's name attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getName()
-    {
-        return $this->_name;
-    }
-
-    /**
-     * Set the value for this element's name attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_State The element being modified.
-     */
-    public function setName($value)
-    {
-        $this->_name = $value;
-        return $this;
-    }
-
-    /**
-     * Get the value for this element's reasonCode attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getReasonCode()
-    {
-        return $this->_reasonCode;
-    }
-
-    /**
-     * Set the value for this element's reasonCode attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_State The element being modified.
-     */
-    public function setReasonCode($value)
-    {
-        $this->_reasonCode = $value;
-        return $this;
-    }
-
-    /**
-     * Get the value for this element's helpUrl attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getHelpUrl()
-    {
-        return $this->_helpUrl;
-    }
-
-    /**
-     * Set the value for this element's helpUrl attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_State The element being modified.
-     */
-    public function setHelpUrl($value)
-    {
-        $this->_helpUrl = $value;
-        return $this;
-    }
-
-    /**
-     * Magic toString method allows using this directly via echo
-     * Works best in PHP >= 4.2.0
-     *
-     * @return string
-     */
-    public function __toString()
-    {
-        return $this->_text;
-    }
-
-}

+ 0 - 309
library/Zend/Gdata/YouTube/Extension/Statistics.php

@@ -1,309 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:statistics element used by the YouTube data API
- *
- * @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_Extension_Statistics extends Zend_Gdata_Extension
-{
-
-    protected $_rootNamespace = 'yt';
-    protected $_rootElement = 'statistics';
-
-    /**
-     * The videoWatchCount attribute specifies the number of videos
-     * that a user has watched on YouTube. The videoWatchCount attribute
-     * is only specified when the <yt:statistics> tag appears within a
-     * user profile entry.
-     *
-     * @var integer
-     */
-    protected $_videoWatchCount = null;
-
-    /**
-     * When the viewCount attribute refers to a video entry, the attribute
-     * specifies the number of times that the video has been viewed.
-     * When the viewCount attribute refers to a user profile, the attribute
-     * specifies the number of times that the user's profile has been
-     * viewed.
-     *
-     * @var integer
-     */
-    protected $_viewCount = null;
-
-    /**
-     * The subscriberCount attribute specifies the number of YouTube users
-     * who have subscribed to a particular user's YouTube channel.
-     * The subscriberCount attribute is only specified when the
-     * <yt:statistics> tag appears within a user profile entry.
-     *
-     * @var integer
-     */
-    protected $_subscriberCount = null;
-
-    /**
-     * The lastWebAccess attribute indicates the most recent time that
-     * a particular user used YouTube.
-     *
-     * @var string
-     */
-    protected $_lastWebAccess = null;
-
-    /**
-     * The favoriteCount attribute specifies the number of YouTube users
-     * who have added a video to their list of favorite videos. The
-     * favoriteCount attribute is only specified when the
-     * <yt:statistics> tag appears within a video entry.
-     *
-     * @var integer
-     */
-    protected $_favoriteCount = null;
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_Extension_Statistics object.
-     * @param string $viewCount(optional) The viewCount value
-     * @param string $videoWatchCount(optional) The videoWatchCount value
-     * @param string $subscriberCount(optional) The subscriberCount value
-     * @param string $lastWebAccess(optional) The lastWebAccess value
-     * @param string $favoriteCount(optional) The favoriteCount value
-     */
-    public function __construct($viewCount = null, $videoWatchCount = null,
-        $subscriberCount = null, $lastWebAccess = null,
-        $favoriteCount = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_viewCount = $viewCount;
-        $this->_videoWatchCount = $videoWatchCount;
-        $this->_subscriberCount = $subscriberCount;
-        $this->_lastWebAccess = $lastWebAccess;
-        $this->_favoriteCount = $favoriteCount;
-    }
-
-    /**
-     * 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->_videoWatchCount !== null) {
-            $element->setAttribute('watchCount', $this->_videoWatchCount);
-        }
-        if ($this->_viewCount !== null) {
-            $element->setAttribute('viewCount', $this->_viewCount);
-        }
-        if ($this->_subscriberCount !== null) {
-            $element->setAttribute('subscriberCount',
-                $this->_subscriberCount);
-        }
-        if ($this->_lastWebAccess !== null) {
-            $element->setAttribute('lastWebAccess',
-                $this->_lastWebAccess);
-        }
-        if ($this->_favoriteCount !== null) {
-            $element->setAttribute('favoriteCount',
-                $this->_favoriteCount);
-        }
-        return $element;
-    }
-
-    /**
-     * Given a DOMNode representing an attribute, tries to map the data into
-     * instance members.  If no mapping is defined, the name and valueare
-     * stored in an array.
-     * TODO: Convert attributes to proper types
-     *
-     * @param DOMNode $attribute The DOMNode attribute needed to be handled
-     */
-    protected function takeAttributeFromDOM($attribute)
-    {
-        switch ($attribute->localName) {
-        case 'videoWatchCount':
-            $this->_videoWatchCount = $attribute->nodeValue;
-            break;
-        case 'viewCount':
-            $this->_viewCount = $attribute->nodeValue;
-            break;
-        case 'subscriberCount':
-            $this->_subscriberCount = $attribute->nodeValue;
-            break;
-        case 'lastWebAccess':
-            $this->_lastWebAccess = $attribute->nodeValue;
-            break;
-        case 'favoriteCount':
-            $this->_favoriteCount = $attribute->nodeValue;
-            break;
-        default:
-            parent::takeAttributeFromDOM($attribute);
-        }
-    }
-
-    /**
-     * Get the value for this element's viewCount attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getViewCount()
-    {
-        return $this->_viewCount;
-    }
-
-    /**
-     * Set the value for this element's viewCount attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_Statistics The element being
-     * modified.
-     */
-    public function setViewCount($value)
-    {
-        $this->_viewCount = $value;
-        return $this;
-    }
-
-    /**
-     * Get the value for this element's videoWatchCount attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getVideoWatchCount()
-    {
-        return $this->_videoWatchCount;
-    }
-
-    /**
-     * Set the value for this element's videoWatchCount attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_Statistics The element being
-     * modified.
-     */
-    public function setVideoWatchCount($value)
-    {
-        $this->_videoWatchCount = $value;
-        return $this;
-    }
-
-    /**
-     * Get the value for this element's subscriberCount attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getSubscriberCount()
-    {
-        return $this->_subscriberCount;
-    }
-
-    /**
-     * Set the value for this element's subscriberCount attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_Statistics The element being
-     * modified.
-     */
-    public function setSubscriberCount($value)
-    {
-        $this->_subscriberCount = $value;
-        return $this;
-    }
-
-    /**
-     * Get the value for this element's lastWebAccess attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getLastWebAccess()
-    {
-        return $this->_lastWebAccess;
-    }
-
-    /**
-     * Set the value for this element's lastWebAccess attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_Statistics The element being
-     * modified.
-     */
-    public function setLastWebAccess($value)
-    {
-        $this->_lastWebAccess = $value;
-        return $this;
-    }
-
-    /**
-     * Get the value for this element's favoriteCount attribute.
-     *
-     * @return int The value associated with this attribute.
-     */
-    public function getFavoriteCount()
-    {
-        return $this->_favoriteCount;
-    }
-
-    /**
-     * Set the value for this element's favoriteCount attribute.
-     *
-     * @param int $value The desired value for this attribute.
-     * @return Zend_Gdata_YouTube_Extension_Statistics The element being
-     * modified.
-     */
-    public function setFavoriteCount($value)
-    {
-        $this->_favoriteCount = $value;
-        return $this;
-    }
-
-    /**
-     * Magic toString method allows using this directly via echo
-     * Works best in PHP >= 4.2.0
-     *
-     * @return string
-     */
-    public function __toString()
-    {
-        return 'View Count=' . $this->_viewCount .
-            ' VideoWatchCount=' . $this->_videoWatchCount .
-            ' SubscriberCount=' . $this->_subscriberCount .
-            ' LastWebAccess=' . $this->_lastWebAccess .
-            ' FavoriteCount=' . $this->_favoriteCount;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Status.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:status element
- *
- * @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_Extension_Status extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'status';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 70
library/Zend/Gdata/YouTube/Extension/Token.php

@@ -1,70 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:token element used by the YouTube data API
- *
- * @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_Extension_Token extends Zend_Gdata_App_Extension
-{
-
-    protected $_rootNamespace = 'yt';
-    protected $_rootElement = 'token';
-
-    /**
-     * Constructs a new Zend_Gdata_YouTube_Extension_Token object.
-     */
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-    /**
-     * 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);
-        return $element;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Uploaded.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:uploaded element
- *
- * @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_Extension_Uploaded extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'uploaded';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/Username.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:username element
- *
- * @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_Extension_Username extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'username';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 51
library/Zend/Gdata/YouTube/Extension/VideoId.php

@@ -1,51 +0,0 @@
-<?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_Extension
- */
-require_once 'Zend/Gdata/Extension.php';
-
-/**
- * Represents the yt:videoid element
- *
- * @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_Extension_VideoId extends Zend_Gdata_Extension
-{
-
-    protected $_rootElement = 'videoid';
-    protected $_rootNamespace = 'yt';
-
-    public function __construct($text = null)
-    {
-        $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
-        parent::__construct();
-        $this->_text = $text;
-    }
-
-}

+ 0 - 281
library/Zend/Gdata/YouTube/InboxEntry.php

@@ -1,281 +0,0 @@
-<?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_Media_Entry
- */
-require_once 'Zend/Gdata/Media/Entry.php';
-
-/**
- * @see Zend_Gdata_Extension_Rating
- */
-require_once 'Zend/Gdata/Extension/Rating.php';
-
-/**
- * @see Zend_Gdata_Extension_Comments
- */
-require_once 'Zend/Gdata/Extension/Comments.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Statistics
- */
-require_once 'Zend/Gdata/YouTube/Extension/Statistics.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Description
- */
-require_once 'Zend/Gdata/YouTube/Extension/Description.php';
-
-
-/**
- * Represents the YouTube message 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_InboxEntry extends Zend_Gdata_Media_Entry
-{
-
-    protected $_entryClassName = 'Zend_Gdata_YouTube_InboxEntry';
-
-    /**
-     * The gd:comments element of this entry.
-     *
-     * @var Zend_Gdata_Extension_Comments
-     */
-    protected $_comments = null;
-
-    /**
-     * The gd:rating element of this entry.
-     *
-     * @var Zend_Gdata_Extension_Rating
-     */
-    protected $_rating = null;
-
-    /**
-     * The yt:statistics element of this entry.
-     *
-     * @var Zend_Gdata_YouTube_Extension_Statistics
-     */
-    protected $_statistics = null;
-
-    /**
-     * The yt:description element of this entry.
-     *
-     * @var Zend_Gdata_YouTube_Extension_Description
-     */
-    protected $_description = null;
-
-    /**
-     * Creates a subscription entry, representing an individual subscription
-     * in a list of subscriptions, usually associated with an individual user.
-     *
-     * @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->_rating != null) {
-            $element->appendChild(
-                $this->_rating->getDOM($element->ownerDocument));
-        }
-        if ($this->_statistics != null) {
-            $element->appendChild(
-                $this->_statistics->getDOM($element->ownerDocument));
-        }
-        if ($this->_comments != null) {
-            $element->appendChild(
-                $this->_comments->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('gd') . ':' . 'comments':
-                $comments = new Zend_Gdata_Extension_Comments();
-                $comments->transferFromDOM($child);
-                $this->_comments = $comments;
-                break;
-            case $this->lookupNamespace('gd') . ':' . 'rating':
-                $rating = new Zend_Gdata_Extension_Rating();
-                $rating->transferFromDOM($child);
-                $this->_rating = $rating;
-                break;
-            case $this->lookupNamespace('yt') . ':' . 'description':
-                $description = new Zend_Gdata_YouTube_Extension_Description();
-                $description->transferFromDOM($child);
-                $this->_description = $description;
-                break;
-            case $this->lookupNamespace('yt') . ':' . 'statistics':
-                $statistics = new Zend_Gdata_YouTube_Extension_Statistics();
-                $statistics->transferFromDOM($child);
-                $this->_statistics = $statistics;
-                break;
-            default:
-                parent::takeChildFromDOM($child);
-                break;
-        }
-    }
-
-    /**
-     * Get the yt:description
-     *
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_Extension_Description|null
-     */
-    public function getDescription()
-    {
-        if ($this->getMajorProtocolVersion() == 2) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The getDescription ' .
-                ' method is only supported in version 1 of the YouTube ' .
-                'API.');
-        } else {
-            return $this->_description;
-        }
-    }
-
-    /**
-     * Sets the yt:description element for a new inbox entry.
-     *
-     * @param Zend_Gdata_YouTube_Extension_Description $description The
-     *        description.
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_InboxEntry Provides a fluent interface
-     */
-    public function setDescription($description = null)
-    {
-        if ($this->getMajorProtocolVersion() == 2) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The setDescription ' .
-                ' method is only supported in version 1 of the YouTube ' .
-                'API.');
-        } else {
-            $this->_description = $description;
-            return $this;
-        }
-    }
-
-    /**
-     * Get the gd:rating element for the inbox entry
-     *
-     * @return Zend_Gdata_Extension_Rating|null
-     */
-    public function getRating()
-    {
-        return $this->_rating;
-    }
-
-    /**
-     * Sets the gd:rating element for the inbox entry
-     *
-     * @param Zend_Gdata_Extension_Rating $rating The rating for the video in
-     *        the message
-     * @return Zend_Gdata_YouTube_InboxEntry Provides a fluent interface
-     */
-    public function setRating($rating = null)
-    {
-        $this->_rating = $rating;
-        return $this;
-    }
-
-    /**
-     * Get the gd:comments element of the inbox entry.
-     *
-     * @return Zend_Gdata_Extension_Comments|null
-     */
-    public function getComments()
-    {
-        return $this->_comments;
-    }
-
-    /**
-     * Sets the gd:comments element for the inbox entry
-     *
-     * @param Zend_Gdata_Extension_Comments $comments The comments feed link
-     * @return Zend_Gdata_YouTube_InboxEntry Provides a fluent interface
-     */
-    public function setComments($comments = null)
-    {
-        $this->_comments = $comments;
-        return $this;
-    }
-
-    /**
-     * Get the yt:statistics element for the inbox entry
-     *
-     * @return Zend_Gdata_YouTube_Extension_Statistics|null
-     */
-    public function getStatistics()
-    {
-        return $this->_statistics;
-    }
-
-    /**
-     * Sets the yt:statistics element for the inbox entry
-     *
-     * @param Zend_Gdata_YouTube_Extension_Statistics $statistics The
-     *        statistics element for the video in the message
-     * @return Zend_Gdata_YouTube_InboxEntry Provides a fluent interface
-     */
-    public function setStatistics($statistics = null)
-    {
-        $this->_statistics = $statistics;
-        return $this;
-    }
-
-
-}

+ 0 - 68
library/Zend/Gdata/YouTube/InboxFeed.php

@@ -1,68 +0,0 @@
-<?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_Media_Feed
- */
-require_once 'Zend/Gdata/Media/Feed.php';
-
-/**
- * @see Zend_Gdata_YouTube_InboxEntry
- */
-require_once 'Zend/Gdata/YouTube/InboxEntry.php';
-
-/**
- * The YouTube inbox feed list flavor of an Atom Feed with media support
- * Represents a list of individual inbox entries, where each contained entry is
- * a message.
- *
- * @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_InboxFeed extends Zend_Gdata_Media_Feed
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_InboxEntry';
-
-    /**
-     * Creates an Inbox feed, representing a list of messages,
-     * associated with an individual user.
-     *
-     * @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);
-    }
-
-}

+ 0 - 81
library/Zend/Gdata/YouTube/MediaEntry.php

@@ -1,81 +0,0 @@
-<?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_Media
- */
-require_once 'Zend/Gdata/Media.php';
-
-/**
- * @see Zend_Gdata_Media_Entry
- */
-require_once 'Zend/Gdata/Media/Entry.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_MediaGroup
- */
-require_once 'Zend/Gdata/YouTube/Extension/MediaGroup.php';
-
-/**
- * Represents the YouTube flavor of a Gdata Media 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_MediaEntry extends Zend_Gdata_Media_Entry
-{
-
-    protected $_entryClassName = 'Zend_Gdata_YouTube_MediaEntry';
-
-    /**
-     * media:group element
-     *
-     * @var Zend_Gdata_YouTube_Extension_MediaGroup
-     */
-    protected $_mediaGroup = null;
-
-    /**
-     * Creates individual Entry objects of the appropriate type and
-     * stores them as members of this entry 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('media') . ':' . 'group':
-            $mediaGroup = new Zend_Gdata_YouTube_Extension_MediaGroup();
-            $mediaGroup->transferFromDOM($child);
-            $this->_mediaGroup = $mediaGroup;
-            break;
-        default:
-            parent::takeChildFromDOM($child);
-            break;
-        }
-    }
-
-}

+ 0 - 300
library/Zend/Gdata/YouTube/PlaylistListEntry.php

@@ -1,300 +0,0 @@
-<?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_YouTube
- */
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @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_PlaylistId
- */
-require_once 'Zend/Gdata/YouTube/Extension/PlaylistId.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_CountHint
- */
-require_once 'Zend/Gdata/YouTube/Extension/CountHint.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_PlaylistListEntry extends Zend_Gdata_Entry
-{
-
-    protected $_entryClassName = 'Zend_Gdata_YouTube_PlaylistListEntry';
-
-    /**
-     * Nested feed links
-     *
-     * @var array
-     */
-    protected $_feedLink = array();
-
-    /**
-     * Description of this playlist
-     *
-     * @deprecated Deprecated as of version 2 of the YouTube API.
-     * @var Zend_Gdata_YouTube_Extension_Description
-     */
-    protected $_description = null;
-
-    /**
-     * Id of this playlist
-     *
-     * @var Zend_Gdata_YouTube_Extension_PlaylistId
-     */
-    protected $_playlistId = null;
-
-    /**
-     * CountHint for this playlist.
-     *
-     * @var Zend_Gdata_YouTube_Extension_CountHint
-     */
-    protected $_countHint = null;
-
-    /**
-     * Creates a Playlist list entry, representing an individual playlist
-     * in a list of playlists, usually associated with an individual user.
-     *
-     * @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->_countHint != null) {
-            $element->appendChild($this->_countHint->getDOM($element->ownerDocument));
-        }
-        if ($this->_playlistId != null) {
-            $element->appendChild($this->_playlistId->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') . ':' . 'countHint':
-            $countHint = new Zend_Gdata_YouTube_Extension_CountHint();
-            $countHint->transferFromDOM($child);
-            $this->_countHint = $countHint;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'playlistId':
-            $playlistId = new Zend_Gdata_YouTube_Extension_PlaylistId();
-            $playlistId->transferFromDOM($child);
-            $this->_playlistId = $playlistId;
-            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 description relating to the playlist.
-     *
-     * @deprecated Deprecated as of version 2 of the YouTube API.
-     * @param Zend_Gdata_YouTube_Extension_Description $description The description relating to the video
-     * @return Zend_Gdata_YouTube_PlaylistListEntry Provides a fluent interface
-     */
-    public function setDescription($description = null)
-    {
-        if ($this->getMajorProtocolVersion() >= 2) {
-            $this->setSummary($description);
-        } else {
-            $this->_description = $description;
-        }
-        return $this;
-    }
-
-    /**
-     * Returns the description relating to the video.
-     *
-     * @return Zend_Gdata_YouTube_Extension_Description  The description
-     *         relating to the video
-     */
-    public function getDescription()
-    {
-        if ($this->getMajorProtocolVersion() >= 2) {
-            return $this->getSummary();
-        } else {
-            return $this->_description;
-        }
-    }
-
-    /**
-     * Returns the countHint relating to the playlist.
-     *
-     * The countHint is the number of videos on a playlist.
-     *
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_Extension_CountHint  The count of videos on
-     *         a playlist.
-     */
-    public function getCountHint()
-    {
-        if (($this->getMajorProtocolVersion() == null) ||
-            ($this->getMajorProtocolVersion() == 1)) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The yt:countHint ' .
-                'element is not supported in versions earlier than 2.');
-        } else {
-            return $this->_countHint;
-        }
-    }
-
-    /**
-     * Returns the Id relating to the playlist.
-     *
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_Extension_PlaylistId  The id of this playlist.
-     */
-    public function getPlaylistId()
-    {
-        if (($this->getMajorProtocolVersion() == null) ||
-            ($this->getMajorProtocolVersion() == 1)) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The yt:playlistId ' .
-                'element is not supported in versions earlier than 2.');
-        } else {
-            return $this->_playlistId;
-        }
-    }
-
-    /**
-     * Sets the array of embedded feeds related to the playlist
-     *
-     * @param array $feedLink The array of embedded feeds relating to the video
-     * @return Zend_Gdata_YouTube_PlaylistListEntry 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 of the playlist video feed
-     *
-     * @return string The URL of the playlist video feed
-     */
-    public function getPlaylistVideoFeedUrl()
-    {
-        if ($this->getMajorProtocolVersion() >= 2) {
-            return $this->getContent()->getSrc();
-        } else {
-            return $this->getFeedLink(Zend_Gdata_YouTube::PLAYLIST_REL)->href;
-        }
-    }
-
-}

+ 0 - 68
library/Zend/Gdata/YouTube/PlaylistListFeed.php

@@ -1,68 +0,0 @@
-<?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_Media_Feed
- */
-require_once 'Zend/Gdata/Media/Feed.php';
-
-/**
- * @see Zend_Gdata_YouTube_PlaylistListEntry
- */
-require_once 'Zend/Gdata/YouTube/PlaylistListEntry.php';
-
-/**
- * The YouTube video playlist flavor of an Atom Feed with media support
- * Represents a list of individual playlists, where each contained entry is
- * a playlist.
- *
- * @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_PlaylistListFeed extends Zend_Gdata_Media_Feed
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_PlaylistListEntry';
-
-    /**
-     * Creates a Playlist list feed, representing a list of playlists,
-     * usually associated with an individual user.
-     *
-     * @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);
-    }
-
-}

+ 0 - 132
library/Zend/Gdata/YouTube/PlaylistVideoEntry.php

@@ -1,132 +0,0 @@
-<?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_YouTube_VideoEntry
- */
-require_once 'Zend/Gdata/YouTube/VideoEntry.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Position
- */
-require_once 'Zend/Gdata/YouTube/Extension/Position.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_PlaylistVideoEntry extends Zend_Gdata_YouTube_VideoEntry
-{
-
-    protected $_entryClassName = 'Zend_Gdata_YouTube_PlaylistVideoEntry';
-
-    /**
-     * Position of the entry in the feed, as specified by the user
-     *
-     * @var Zend_Gdata_YouTube_Extension_Position
-     */
-    protected $_position = null;
-
-    /**
-     * Creates a Playlist video entry, representing an individual video
-     * in a list of videos contained within a specific playlist
-     *
-     * @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->_position !== null) {
-            $element->appendChild($this->_position->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') . ':' . 'position':
-            $position = new Zend_Gdata_YouTube_Extension_Position();
-            $position->transferFromDOM($child);
-            $this->_position = $position;
-            break;
-        default:
-            parent::takeChildFromDOM($child);
-            break;
-        }
-    }
-
-
-    /**
-     * Sets the array of embedded feeds related to the video
-     *
-     * @param Zend_Gdata_YouTube_Extension_Position $position
-     *     The position of the entry in the feed, as specified by the user.
-     * @return Zend_Gdata_YouTube_PlaylistVideoEntry Provides a fluent interface
-     */
-    public function setPosition($position = null)
-    {
-        $this->_position = $position;
-        return $this;
-    }
-
-    /**
-     * Returns the position of the entry in the feed, as specified by the user
-     *
-     * @return Zend_Gdata_YouTube_Extension_Position The position
-     */
-    public function getPosition()
-    {
-        return $this->_position;
-    }
-
-}

+ 0 - 68
library/Zend/Gdata/YouTube/PlaylistVideoFeed.php

@@ -1,68 +0,0 @@
-<?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_Media_Feed
- */
-require_once 'Zend/Gdata/Media/Feed.php';
-
-/**
- * @see Zend_Gdata_YouTube_PlaylistVideoEntry
- */
-require_once 'Zend/Gdata/YouTube/PlaylistVideoEntry.php';
-
-/**
- * The YouTube video playlist flavor of an Atom Feed with media support
- * Represents a list of videos contained in a playlist.  Each entry in this
- * feed represents an individual video.
- *
- * @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_PlaylistVideoFeed extends Zend_Gdata_Media_Feed
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_PlaylistVideoEntry';
-
-    /**
-     * Creates a Play Video feed, representing a list of videos contained
-     * within a single playlist.
-     *
-     * @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);
-    }
-
-}

+ 0 - 446
library/Zend/Gdata/YouTube/SubscriptionEntry.php

@@ -1,446 +0,0 @@
-<?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_PlaylistTitle
- */
-require_once 'Zend/Gdata/YouTube/Extension/PlaylistTitle.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_PlaylistId
- */
-require_once 'Zend/Gdata/YouTube/Extension/PlaylistId.php';
-
-/**
- * @see Zend_Gdata_Media_Extension_MediaThumbnail
- */
-require_once 'Zend/Gdata/Media/Extension/MediaThumbnail.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Username
- */
-require_once 'Zend/Gdata/YouTube/Extension/Username.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_CountHint
- */
-require_once 'Zend/Gdata/YouTube/Extension/CountHint.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_QueryString
- */
-require_once 'Zend/Gdata/YouTube/Extension/QueryString.php';
-
-/**
- * Represents the YouTube video subscription 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_SubscriptionEntry extends Zend_Gdata_Entry
-{
-
-    protected $_entryClassName = 'Zend_Gdata_YouTube_SubscriptionEntry';
-
-    /**
-     * Nested feed links
-     *
-     * @var array
-     */
-    protected $_feedLink = array();
-
-    /**
-     * The username of this entry.
-     *
-     * @var Zend_Gdata_YouTube_Extension_Username
-     */
-    protected $_username = null;
-
-    /**
-     * The playlist title for this entry.
-     *
-     * This element is only used on subscriptions to playlists.
-     *
-     * @var Zend_Gdata_YouTube_Extension_PlaylistTitle
-     */
-    protected $_playlistTitle = null;
-
-    /**
-     * The playlist id for this entry.
-     *
-     * This element is only used on subscriptions to playlists.
-     *
-     * @var Zend_Gdata_YouTube_Extension_PlaylistId
-     */
-    protected $_playlistId = null;
-
-    /**
-     * The media:thumbnail element for this entry.
-     *
-     * This element is only used on subscriptions to playlists.
-     *
-     * @var Zend_Gdata_Media_Extension_MediaThumbnail
-     */
-    protected $_mediaThumbnail = null;
-
-    /**
-     * The countHint for this entry.
-     *
-     * @var Zend_Gdata_YouTube_Extension_CountHint
-     */
-    protected $_countHint = null;
-
-    /**
-     * The queryString for this entry.
-     *
-     * @var Zend_Gdata_YouTube_Extension_QueryString
-     */
-    protected $_queryString = null;
-
-    /**
-     * Creates a subscription entry, representing an individual subscription
-     * in a list of subscriptions, usually associated with an individual user.
-     *
-     * @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->_countHint != null) {
-            $element->appendChild($this->_countHint->getDOM($element->ownerDocument));
-        }
-        if ($this->_playlistTitle != null) {
-            $element->appendChild($this->_playlistTitle->getDOM($element->ownerDocument));
-        }
-        if ($this->_playlistId != null) {
-            $element->appendChild($this->_playlistId->getDOM($element->ownerDocument));
-        }
-        if ($this->_mediaThumbnail != null) {
-            $element->appendChild($this->_mediaThumbnail->getDOM($element->ownerDocument));
-        }
-        if ($this->_username != null) {
-            $element->appendChild($this->_username->getDOM($element->ownerDocument));
-        }
-        if ($this->_queryString != null) {
-            $element->appendChild($this->_queryString->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('gd') . ':' . 'feedLink':
-            $feedLink = new Zend_Gdata_Extension_FeedLink();
-            $feedLink->transferFromDOM($child);
-            $this->_feedLink[] = $feedLink;
-            break;
-        case $this->lookupNamespace('media') . ':' . 'thumbnail':
-            $mediaThumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail();
-            $mediaThumbnail->transferFromDOM($child);
-            $this->_mediaThumbnail = $mediaThumbnail;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'countHint':
-            $countHint = new Zend_Gdata_YouTube_Extension_CountHint();
-            $countHint->transferFromDOM($child);
-            $this->_countHint = $countHint;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'playlistTitle':
-            $playlistTitle = new Zend_Gdata_YouTube_Extension_PlaylistTitle();
-            $playlistTitle->transferFromDOM($child);
-            $this->_playlistTitle = $playlistTitle;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'playlistId':
-            $playlistId = new Zend_Gdata_YouTube_Extension_PlaylistId();
-            $playlistId->transferFromDOM($child);
-            $this->_playlistId = $playlistId;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'queryString':
-            $queryString = new Zend_Gdata_YouTube_Extension_QueryString();
-            $queryString->transferFromDOM($child);
-            $this->_queryString = $queryString;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'username':
-            $username = new Zend_Gdata_YouTube_Extension_Username();
-            $username->transferFromDOM($child);
-            $this->_username = $username;
-            break;
-        default:
-            parent::takeChildFromDOM($child);
-            break;
-        }
-    }
-
-    /**
-     * 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_SubscriptionEntry 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;
-        }
-    }
-
-    /**
-     * Get the playlist title for a 'playlist' subscription.
-     *
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_Extension_PlaylistId
-     */
-    public function getPlaylistId()
-    {
-        if (($this->getMajorProtocolVersion() == null) ||
-           ($this->getMajorProtocolVersion() == 1)) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The getPlaylistId ' .
-                ' method is only supported as of version 2 of the YouTube ' .
-                'API.');
-        } else {
-            return $this->_playlistId;
-        }
-    }
-
-    /**
-     * Sets the yt:playlistId element for a new playlist subscription.
-     *
-     * @param Zend_Gdata_YouTube_Extension_PlaylistId $id The id of
-     *        the playlist to which to subscribe to.
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_SubscriptionEntry Provides a fluent interface
-     */
-    public function setPlaylistId($id = null)
-    {
-        if (($this->getMajorProtocolVersion() == null) ||
-           ($this->getMajorProtocolVersion() == 1)) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The setPlaylistTitle ' .
-                ' method is only supported as of version 2 of the YouTube ' .
-                'API.');
-        } else {
-            $this->_playlistId = $id;
-            return $this;
-        }
-    }
-
-    /**
-     * Get the queryString of the subscription
-     *
-     * @return Zend_Gdata_YouTube_Extension_QueryString
-     */
-    public function getQueryString()
-    {
-        return $this->_queryString;
-    }
-
-    /**
-     * Sets the yt:queryString element for a new keyword subscription.
-     *
-     * @param Zend_Gdata_YouTube_Extension_QueryString $queryString The query
-     *        string to subscribe to
-     * @return Zend_Gdata_YouTube_SubscriptionEntry Provides a fluent interface
-     */
-    public function setQueryString($queryString = null)
-    {
-        $this->_queryString = $queryString;
-        return $this;
-    }
-
-    /**
-     * Get the playlist title for a 'playlist' subscription.
-     *
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_Extension_PlaylistTitle
-     */
-    public function getPlaylistTitle()
-    {
-        if (($this->getMajorProtocolVersion() == null) ||
-           ($this->getMajorProtocolVersion() == 1)) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The getPlaylistTitle ' .
-                ' method is only supported as of version 2 of the YouTube ' .
-                'API.');
-        } else {
-            return $this->_playlistTitle;
-        }
-    }
-
-    /**
-     * Sets the yt:playlistTitle element for a new playlist subscription.
-     *
-     * @param Zend_Gdata_YouTube_Extension_PlaylistTitle $title The title of
-     *        the playlist to which to subscribe to.
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_SubscriptionEntry Provides a fluent interface
-     */
-    public function setPlaylistTitle($title = null)
-    {
-        if (($this->getMajorProtocolVersion() == null) ||
-           ($this->getMajorProtocolVersion() == 1)) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The setPlaylistTitle ' .
-                ' method is only supported as of version 2 of the YouTube ' .
-                'API.');
-        } else {
-            $this->_playlistTitle = $title;
-            return $this;
-        }
-    }
-
-    /**
-     * Get the counthint for a subscription.
-     *
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_Extension_CountHint
-     */
-    public function getCountHint()
-    {
-        if (($this->getMajorProtocolVersion() == null) ||
-           ($this->getMajorProtocolVersion() == 1)) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The getCountHint ' .
-                ' method is only supported as of version 2 of the YouTube ' .
-                'API.');
-        } else {
-            return $this->_countHint;
-        }
-    }
-
-    /**
-     * Get the thumbnail for a subscription.
-     *
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_Media_Extension_MediaThumbnail
-     */
-    public function getMediaThumbnail()
-    {
-        if (($this->getMajorProtocolVersion() == null) ||
-           ($this->getMajorProtocolVersion() == 1)) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException('The getMediaThumbnail ' .
-                ' method is only supported as of version 2 of the YouTube ' .
-                'API.');
-        } else {
-            return $this->_mediaThumbnail;
-        }
-    }
-
-    /**
-     * Get the username for a channel subscription.
-     *
-     * @return Zend_Gdata_YouTube_Extension_Username
-     */
-    public function getUsername()
-    {
-        return $this->_username;
-    }
-
-    /**
-     * Sets the username for a new channel subscription.
-     *
-     * @param Zend_Gdata_YouTube_Extension_Username $username The username of
-     *        the channel to which to subscribe to.
-     * @return Zend_Gdata_YouTube_SubscriptionEntry Provides a fluent interface
-     */
-    public function setUsername($username = null)
-    {
-        $this->_username = $username;
-        return $this;
-    }
-
-}

+ 0 - 68
library/Zend/Gdata/YouTube/SubscriptionFeed.php

@@ -1,68 +0,0 @@
-<?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_Media_Feed
- */
-require_once 'Zend/Gdata/Media/Feed.php';
-
-/**
- * @see Zend_Gdata_YouTube_SubscriptionEntry
- */
-require_once 'Zend/Gdata/YouTube/SubscriptionEntry.php';
-
-/**
- * The YouTube video subscription list flavor of an Atom Feed with media support
- * Represents a list of individual subscriptions, where each contained entry is
- * a subscription.
- *
- * @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_SubscriptionFeed extends Zend_Gdata_Media_Feed
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_SubscriptionEntry';
-
-    /**
-     * Creates a Subscription feed, representing a list of subscriptions,
-     * usually associated with an individual user.
-     *
-     * @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);
-    }
-
-}

+ 0 - 1041
library/Zend/Gdata/YouTube/UserProfileEntry.php

@@ -1,1041 +0,0 @@
-<?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);
-    }
-
-}

+ 0 - 1095
library/Zend/Gdata/YouTube/VideoEntry.php

@@ -1,1095 +0,0 @@
-<?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_Extension_Comments
- */
-require_once 'Zend/Gdata/Extension/Comments.php';
-
-/**
- * @see Zend_Gdata_Extension_FeedLink
- */
-require_once 'Zend/Gdata/Extension/FeedLink.php';
-
-/**
- * @see Zend_Gdata_YouTube_MediaEntry
- */
-require_once 'Zend/Gdata/YouTube/MediaEntry.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_MediaGroup
- */
-require_once 'Zend/Gdata/YouTube/Extension/MediaGroup.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_NoEmbed
- */
-require_once 'Zend/Gdata/YouTube/Extension/NoEmbed.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Statistics
- */
-require_once 'Zend/Gdata/YouTube/Extension/Statistics.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Link
- */
-require_once 'Zend/Gdata/YouTube/Extension/Link.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Racy
- */
-require_once 'Zend/Gdata/YouTube/Extension/Racy.php';
-
-/**
- * @see Zend_Gdata_Extension_Rating
- */
-require_once 'Zend/Gdata/Extension/Rating.php';
-
-/**
- * @see Zend_Gdata_Geo_Extension_GeoRssWhere
- */
-require_once 'Zend/Gdata/Geo/Extension/GeoRssWhere.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Control
- */
-require_once 'Zend/Gdata/YouTube/Extension/Control.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Recorded
- */
-require_once 'Zend/Gdata/YouTube/Extension/Recorded.php';
-
-/**
- * @see Zend_Gdata_YouTube_Extension_Location
- */
-require_once 'Zend/Gdata/YouTube/Extension/Location.php';
-
-/**
- * Represents the YouTube video 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_VideoEntry extends Zend_Gdata_YouTube_MediaEntry
-{
-
-    const YOUTUBE_DEVELOPER_TAGS_SCHEMA = 'http://gdata.youtube.com/schemas/2007/developertags.cat';
-    const YOUTUBE_CATEGORY_SCHEMA = 'http://gdata.youtube.com/schemas/2007/categories.cat';
-    protected $_entryClassName = 'Zend_Gdata_YouTube_VideoEntry';
-
-    /**
-     * If null, the video can be embedded
-     *
-     * @var Zend_Gdata_YouTube_Extension_NoEmbed|null
-     */
-    protected $_noEmbed = null;
-
-    /**
-     * Specifies the statistics relating to the video.
-     *
-     * @var Zend_Gdata_YouTube_Extension_Statistics
-     */
-    protected $_statistics = null;
-
-    /**
-     * If not null, specifies that the video has racy content.
-     *
-     * @var Zend_Gdata_YouTube_Extension_Racy|null
-     */
-    protected $_racy = null;
-
-    /**
-     * If not null, specifies that the video is private.
-     *
-     * @var Zend_Gdata_YouTube_Extension_Private|null
-     */
-    protected $_private = null;
-
-    /**
-     * Specifies the video's rating.
-     *
-     * @var Zend_Gdata_Extension_Rating
-     */
-    protected $_rating = null;
-
-    /**
-     * Specifies the comments associated with a video.
-     *
-     * @var Zend_Gdata_Extensions_Comments
-     */
-    protected $_comments = null;
-
-    /**
-     * Nested feed links
-     *
-     * @var array
-     */
-    protected $_feedLink = array();
-
-    /**
-     * Geo location for the video
-     *
-     * @var Zend_Gdata_Geo_Extension_GeoRssWhere
-     */
-    protected $_where = null;
-
-    /**
-     * Recording date for the video
-     *
-     * @var Zend_Gdata_YouTube_Extension_Recorded|null
-     */
-    protected $_recorded = null;
-
-    /**
-     * Location informtion for the video
-     *
-     * @var Zend_Gdata_YouTube_Extension_Location|null
-     */
-    protected $_location = null;
-
-    /**
-     * Creates a Video entry, representing an individual video
-     *
-     * @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->_noEmbed != null) {
-            $element->appendChild($this->_noEmbed->getDOM(
-                $element->ownerDocument));
-        }
-        if ($this->_statistics != null) {
-            $element->appendChild($this->_statistics->getDOM(
-                $element->ownerDocument));
-        }
-        if ($this->_racy != null) {
-            $element->appendChild($this->_racy->getDOM(
-                $element->ownerDocument));
-        }
-        if ($this->_recorded != null) {
-            $element->appendChild($this->_recorded->getDOM(
-                $element->ownerDocument));
-        }
-        if ($this->_location != null) {
-            $element->appendChild($this->_location->getDOM(
-                $element->ownerDocument));
-        }
-        if ($this->_rating != null) {
-            $element->appendChild($this->_rating->getDOM(
-                $element->ownerDocument));
-        }
-        if ($this->_comments != null) {
-            $element->appendChild($this->_comments->getDOM(
-                $element->ownerDocument));
-        }
-        if ($this->_feedLink != null) {
-            foreach ($this->_feedLink as $feedLink) {
-                $element->appendChild($feedLink->getDOM(
-                    $element->ownerDocument));
-            }
-        }
-        if ($this->_where != null) {
-           $element->appendChild($this->_where->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') . ':' . 'statistics':
-            $statistics = new Zend_Gdata_YouTube_Extension_Statistics();
-            $statistics->transferFromDOM($child);
-            $this->_statistics = $statistics;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'racy':
-            $racy = new Zend_Gdata_YouTube_Extension_Racy();
-            $racy->transferFromDOM($child);
-            $this->_racy = $racy;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'recorded':
-            $recorded = new Zend_Gdata_YouTube_Extension_Recorded();
-            $recorded->transferFromDOM($child);
-            $this->_recorded = $recorded;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'location':
-            $location = new Zend_Gdata_YouTube_Extension_Location();
-            $location->transferFromDOM($child);
-            $this->_location = $location;
-            break;
-        case $this->lookupNamespace('gd') . ':' . 'rating':
-            $rating = new Zend_Gdata_Extension_Rating();
-            $rating->transferFromDOM($child);
-            $this->_rating = $rating;
-            break;
-        case $this->lookupNamespace('gd') . ':' . 'comments':
-            $comments = new Zend_Gdata_Extension_Comments();
-            $comments->transferFromDOM($child);
-            $this->_comments = $comments;
-            break;
-        case $this->lookupNamespace('yt') . ':' . 'noembed':
-            $noEmbed = new Zend_Gdata_YouTube_Extension_NoEmbed();
-            $noEmbed->transferFromDOM($child);
-            $this->_noEmbed = $noEmbed;
-            break;
-        case $this->lookupNamespace('gd') . ':' . 'feedLink':
-            $feedLink = new Zend_Gdata_Extension_FeedLink();
-            $feedLink->transferFromDOM($child);
-            $this->_feedLink[] = $feedLink;
-            break;
-        case $this->lookupNamespace('georss') . ':' . 'where':
-            $where = new Zend_Gdata_Geo_Extension_GeoRssWhere();
-            $where->transferFromDOM($child);
-            $this->_where = $where;
-            break;
-        case $this->lookupNamespace('atom') . ':' . 'link';
-            $link = new Zend_Gdata_YouTube_Extension_Link();
-            $link->transferFromDOM($child);
-            $this->_link[] = $link;
-            break;
-        case $this->lookupNamespace('app') . ':' . 'control':
-            $control = new Zend_Gdata_YouTube_Extension_Control();
-            $control->transferFromDOM($child);
-            $this->_control = $control;
-            break;
-        default:
-            parent::takeChildFromDOM($child);
-            break;
-        }
-    }
-
-    /**
-     * Sets when the video was recorded.
-     *
-     * @param Zend_Gdata_YouTube_Extension_Recorded $recorded When the video was recorded
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setRecorded($recorded = null)
-    {
-        $this->_recorded = $recorded;
-        return $this;
-    }
-
-    /**
-     * Gets the date that the video was recorded.
-     *
-     * @return Zend_Gdata_YouTube_Extension_Recorded|null
-     */
-    public function getRecorded()
-    {
-        return $this->_recorded;
-    }
-
-    /**
-     * Sets the location information.
-     *
-     * @param Zend_Gdata_YouTube_Extension_Location $location Where the video
-     *        was recorded
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setLocation($location = null)
-    {
-        $this->_location = $location;
-        return $this;
-    }
-
-    /**
-     * Gets the location where the video was recorded.
-     *
-     * @return Zend_Gdata_YouTube_Extension_Location|null
-     */
-    public function getLocation()
-    {
-        return $this->_location;
-    }
-
-    /**
-     * If an instance of Zend_Gdata_YouTube_Extension_NoEmbed is passed in,
-     * the video cannot be embedded.  Otherwise, if null is passsed in, the
-     * video is able to be embedded.
-     *
-     * @param Zend_Gdata_YouTube_Extension_NoEmbed $noEmbed Whether or not the
-     *          video can be embedded.
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setNoEmbed($noEmbed = null)
-    {
-        $this->_noEmbed = $noEmbed;
-        return $this;
-    }
-
-    /**
-     * If the return value is an instance of
-     * Zend_Gdata_YouTube_Extension_NoEmbed, this video cannot be embedded.
-     *
-     * @return Zend_Gdata_YouTube_Extension_NoEmbed|null Whether or not the video can be embedded
-     */
-    public function getNoEmbed()
-    {
-        return $this->_noEmbed;
-    }
-
-    /**
-     * Checks whether the video is embeddable.
-     *
-     * @return bool Returns true if the video is embeddable.
-     */
-    public function isVideoEmbeddable()
-    {
-        if ($this->getNoEmbed() == null) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * Sets the statistics relating to the video.
-     *
-     * @param Zend_Gdata_YouTube_Extension_Statistics $statistics The statistics relating to the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setStatistics($statistics = null)
-    {
-        $this->_statistics = $statistics;
-        return $this;
-    }
-
-    /**
-     * Returns the statistics relating to the video.
-     *
-     * @return Zend_Gdata_YouTube_Extension_Statistics  The statistics relating to the video
-     */
-    public function getStatistics()
-    {
-        return $this->_statistics;
-    }
-
-    /**
-     * Specifies that the video has racy content.
-     *
-     * @param Zend_Gdata_YouTube_Extension_Racy $racy The racy flag object
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setRacy($racy = null)
-    {
-        if ($this->getMajorProtocolVersion() == 2) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException(
-                'Calling getRacy() on a YouTube VideoEntry is deprecated ' .
-                'as of version 2 of the API.');
-        }
-
-        $this->_racy = $racy;
-        return $this;
-    }
-
-    /**
-     * Returns the racy flag object.
-     *
-     * @throws Zend_Gdata_App_VersionException
-     * @return Zend_Gdata_YouTube_Extension_Racy|null  The racy flag object
-     */
-    public function getRacy()
-    {
-        if ($this->getMajorProtocolVersion() == 2) {
-            require_once 'Zend/Gdata/App/VersionException.php';
-            throw new Zend_Gdata_App_VersionException(
-                'Calling getRacy() on a YouTube VideoEntry is deprecated ' .
-                'as of version 2 of the API.');
-        }
-        return $this->_racy;
-    }
-
-    /**
-     * Sets the rating relating to the video.
-     *
-     * @param Zend_Gdata_Extension_Rating $rating The rating relating to the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setRating($rating = null)
-    {
-        $this->_rating = $rating;
-        return $this;
-    }
-
-    /**
-     * Returns the rating relating to the video.
-     *
-     * @return Zend_Gdata_Extension_Rating  The rating relating to the video
-     */
-    public function getRating()
-    {
-        return $this->_rating;
-    }
-
-    /**
-     * Sets the comments relating to the video.
-     *
-     * @param Zend_Gdata_Extension_Comments $comments The comments relating to the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setComments($comments = null)
-    {
-        $this->_comments = $comments;
-        return $this;
-    }
-
-    /**
-     * Returns the comments relating to the video.
-     *
-     * @return Zend_Gdata_Extension_Comments  The comments relating to the video
-     */
-    public function getComments()
-    {
-        return $this->_comments;
-    }
-
-    /**
-     * 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_VideoEntry 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 link element relating to video responses.
-     *
-     * @return Zend_Gdata_App_Extension_Link
-     */
-    public function getVideoResponsesLink()
-    {
-        return $this->getLink(Zend_Gdata_YouTube::VIDEO_RESPONSES_REL);
-    }
-
-    /**
-     * Returns the link element relating to video ratings.
-     *
-     * @return Zend_Gdata_App_Extension_Link
-     */
-    public function getVideoRatingsLink()
-    {
-        return $this->getLink(Zend_Gdata_YouTube::VIDEO_RATINGS_REL);
-    }
-
-    /**
-     * Returns the link element relating to video complaints.
-     *
-     * @return Zend_Gdata_App_Extension_Link
-     */
-    public function getVideoComplaintsLink()
-    {
-        return $this->getLink(Zend_Gdata_YouTube::VIDEO_COMPLAINTS_REL);
-    }
-
-    /**
-     * Gets the YouTube video ID based upon the atom:id value
-     *
-     * @return string The video ID
-     */
-    public function getVideoId()
-    {
-        if ($this->getMajorProtocolVersion() == 2) {
-            $videoId = $this->getMediaGroup()->getVideoId()->text;
-        } else {
-            $fullId = $this->getId()->getText();
-            $position = strrpos($fullId, '/');
-            if ($position === false) {
-                require_once 'Zend/Gdata/App/Exception.php';
-                throw new Zend_Gdata_App_Exception(
-                    'Slash not found in atom:id of ' . $fullId);
-            } else {
-                $videoId = substr($fullId, $position + 1);
-            }
-        }
-        return $videoId;
-    }
-
-    /**
-     * Gets the date that the video was recorded.
-     *
-     * @return string|null The date that the video was recorded
-     */
-    public function getVideoRecorded()
-    {
-        $recorded = $this->getRecorded();
-        if ($recorded != null) {
-          return $recorded->getText();
-        } else {
-          return null;
-        }
-    }
-
-    /**
-     * Sets the date that the video was recorded.
-     *
-     * @param string $recorded The date that the video was recorded, in the
-     *          format of '2001-06-19'
-     */
-    public function setVideoRecorded($recorded)
-    {
-        $this->setRecorded(
-            new Zend_Gdata_YouTube_Extension_Recorded($recorded));
-        return $this;
-    }
-
-    /**
-     * Gets the georss:where element
-     *
-     * @return Zend_Gdata_Geo_Extension_GeoRssWhere
-     */
-    public function getWhere()
-    {
-        return $this->_where;
-    }
-
-    /**
-     * Sets the georss:where element
-     *
-     * @param Zend_Gdata_Geo_Extension_GeoRssWhere $value The georss:where class value
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setWhere($value)
-    {
-        $this->_where = $value;
-        return $this;
-    }
-
-    /**
-     * Gets the title of the video as a string.  null is returned
-     * if the video title is not available.
-     *
-     * @return string|null The title of the video
-     */
-    public function getVideoTitle()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        if ($this->getMediaGroup()->getTitle() != null) {
-            return $this->getMediaGroup()->getTitle()->getText();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Sets the title of the video as a string.
-     *
-     * @param string $title Title for the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setVideoTitle($title)
-    {
-        $this->ensureMediaGroupIsNotNull();
-        $this->getMediaGroup()->setTitle(
-            new Zend_Gdata_Media_Extension_MediaTitle($title));
-        return $this;
-    }
-
-    /**
-     * Sets the description of the video as a string.
-     *
-     * @param string $description Description for the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setVideoDescription($description)
-    {
-        $this->ensureMediaGroupIsNotNull();
-        $this->getMediaGroup()->setDescription(
-            new Zend_Gdata_Media_Extension_MediaDescription($description));
-        return $this;
-    }
-
-
-    /**
-     * Gets the description  of the video as a string.  null is returned
-     * if the video description is not available.
-     *
-     * @return string|null The description of the video
-     */
-    public function getVideoDescription()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        if ($this->getMediaGroup()->getDescription() != null) {
-            return $this->getMediaGroup()->getDescription()->getText();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Gets the URL of the YouTube video watch page.  null is returned
-     * if the video watch page URL is not available.
-     *
-     * @return string|null The URL of the YouTube video watch page
-     */
-    public function getVideoWatchPageUrl()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        if ($this->getMediaGroup()->getPlayer() != null &&
-             array_key_exists(0, $this->getMediaGroup()->getPlayer())) {
-            $players = $this->getMediaGroup()->getPlayer();
-            return $players[0]->getUrl();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Gets an array of the thumbnails representing the video.
-     * Each thumbnail is an element of the array, and is an
-     * array of the thumbnail properties - time, height, width,
-     * and url.  For convient usage inside a foreach loop, an
-     * empty array is returned if there are no thumbnails.
-     *
-     * @return array An array of video thumbnails.
-     */
-    public function getVideoThumbnails()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        if ($this->getMediaGroup()->getThumbnail() != null) {
-
-            $thumbnailArray = array();
-
-            foreach ($this->getMediaGroup()->getThumbnail() as $thumbnailObj) {
-                $thumbnail = array();
-                $thumbnail['time'] = $thumbnailObj->time;
-                $thumbnail['height'] = $thumbnailObj->height;
-                $thumbnail['width'] = $thumbnailObj->width;
-                $thumbnail['url'] = $thumbnailObj->url;
-                $thumbnailArray[] = $thumbnail;
-            }
-            return $thumbnailArray;
-        } else {
-            return array();
-        }
-    }
-
-    /**
-     * Gets the URL of the flash player SWF.  null is returned if the
-     * duration value is not available.
-     *
-     * @return string|null The URL of the flash player SWF
-     */
-    public function getFlashPlayerUrl()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        foreach ($this->getMediaGroup()->getContent() as $content) {
-                if ($content->getType() === 'application/x-shockwave-flash') {
-                    return $content->getUrl();
-                }
-            }
-        return null;
-    }
-
-    /**
-     * Gets the duration of the video, in seconds.  null is returned
-     * if the duration value is not available.
-     *
-     * @return string|null The duration of the video, in seconds.
-     */
-    public function getVideoDuration()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        if ($this->getMediaGroup()->getDuration() != null) {
-            return $this->getMediaGroup()->getDuration()->getSeconds();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Checks whether the video is private.
-     *
-     * @return bool Return true if video is private
-     */
-    public function isVideoPrivate()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        if ($this->getMediaGroup()->getPrivate() != null) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * Sets video to private.
-     *
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setVideoPrivate()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        $this->getMediaGroup()->setPrivate(new Zend_Gdata_YouTube_Extension_Private());
-        return $this;
-    }
-
-    /**
-     * Sets a private video to be public.
-     *
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setVideoPublic()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        $this->getMediaGroup()->private = null;
-        return $this;
-    }
-
-    /**
-     * Gets an array of the tags assigned to this video.  For convient
-     * usage inside a foreach loop, an empty array is returned when there
-     * are no tags assigned.
-     *
-     * @return array An array of the tags assigned to this video
-     */
-    public function getVideoTags()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        if ($this->getMediaGroup()->getKeywords() != null) {
-
-            $keywords = $this->getMediaGroup()->getKeywords();
-            $keywordsString = $keywords->getText();
-            if (strlen(trim($keywordsString)) > 0) {
-                return preg_split('/(, *)|,/', $keywordsString);
-            }
-        }
-        return array();
-    }
-
-    /**
-     * Sets the keyword tags for a video.
-     *
-     * @param mixed $tags Either a comma-separated string or an array
-     * of tags for the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setVideoTags($tags)
-    {
-        $this->ensureMediaGroupIsNotNull();
-        $keywords = new Zend_Gdata_Media_Extension_MediaKeywords();
-        if (is_array($tags)) {
-            $tags = implode(', ', $tags);
-        }
-        $keywords->setText($tags);
-        $this->getMediaGroup()->setKeywords($keywords);
-        return $this;
-    }
-
-    /**
-     * Gets the number of views for this video.  null is returned if the
-     * number of views is not available.
-     *
-     * @return string|null The number of views for this video
-     */
-    public function getVideoViewCount()
-    {
-        if ($this->getStatistics() != null) {
-            return $this->getStatistics()->getViewCount();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Gets the location specified for this video, if available.  The location
-     * is returned as an array containing the keys 'longitude' and 'latitude'.
-     * null is returned if the location is not available.
-     *
-     * @return array|null The location specified for this video
-     */
-    public function getVideoGeoLocation()
-    {
-        if ($this->getWhere() != null &&
-            $this->getWhere()->getPoint() != null &&
-            ($position = $this->getWhere()->getPoint()->getPos()) != null) {
-
-            $positionString = $position->__toString();
-
-            if (strlen(trim($positionString)) > 0) {
-                $positionArray = explode(' ', trim($positionString));
-                if (count($positionArray) == 2) {
-                    $returnArray = array();
-                    $returnArray['latitude'] = $positionArray[0];
-                    $returnArray['longitude'] = $positionArray[1];
-                    return $returnArray;
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Gets the rating information for this video, if available.  The rating
-     * is returned as an array containing the keys 'average' and 'numRaters'.
-     * null is returned if the rating information is not available.
-     *
-     * @return array|null The rating information for this video
-     */
-    public function getVideoRatingInfo()
-    {
-        if ($this->getRating() != null) {
-            $returnArray = array();
-            $returnArray['average'] = $this->getRating()->getAverage();
-            $returnArray['numRaters'] = $this->getRating()->getNumRaters();
-            return $returnArray;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Gets the category of this video, if available.  The category is returned
-     * as a string. Valid categories are found at:
-     * http://gdata.youtube.com/schemas/2007/categories.cat
-     * If the category is not set, null is returned.
-     *
-     * @return string|null The category of this video
-     */
-    public function getVideoCategory()
-    {
-        $this->ensureMediaGroupIsNotNull();
-        $categories = $this->getMediaGroup()->getCategory();
-        if ($categories != null) {
-            foreach($categories as $category) {
-                if ($category->getScheme() == self::YOUTUBE_CATEGORY_SCHEMA) {
-                    return $category->getText();
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Sets the category of the video as a string.
-     *
-     * @param string $category Categories for the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setVideoCategory($category)
-    {
-        $this->ensureMediaGroupIsNotNull();
-        $this->getMediaGroup()->setCategory(array(new Zend_Gdata_Media_Extension_MediaCategory($category, self::YOUTUBE_CATEGORY_SCHEMA)));
-        return $this;
-    }
-
-    /**
-     * Gets the developer tags for the video, if available and if client is
-     * authenticated with a valid developerKey. The tags are returned
-     * as an array.
-     * If no tags are set, null is returned.
-     *
-     * @return array|null The developer tags for this video or null if none were set.
-     */
-    public function getVideoDeveloperTags()
-    {
-        $developerTags = null;
-        $this->ensureMediaGroupIsNotNull();
-
-        $categoryArray = $this->getMediaGroup()->getCategory();
-        if ($categoryArray != null) {
-            foreach ($categoryArray as $category) {
-                if ($category instanceof Zend_Gdata_Media_Extension_MediaCategory) {
-                    if ($category->getScheme() == self::YOUTUBE_DEVELOPER_TAGS_SCHEMA) {
-                        $developerTags[] = $category->getText();
-                    }
-                }
-            }
-            return $developerTags;
-        }
-        return null;
-    }
-
-    /**
-     * Adds a developer tag to array of tags for the video.
-     *
-     * @param string $developerTag DeveloperTag for the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function addVideoDeveloperTag($developerTag)
-    {
-        $this->ensureMediaGroupIsNotNull();
-        $newCategory = new Zend_Gdata_Media_Extension_MediaCategory($developerTag, self::YOUTUBE_DEVELOPER_TAGS_SCHEMA);
-
-        if ($this->getMediaGroup()->getCategory() == null) {
-            $this->getMediaGroup()->setCategory($newCategory);
-        } else {
-            $categories = $this->getMediaGroup()->getCategory();
-            $categories[] = $newCategory;
-            $this->getMediaGroup()->setCategory($categories);
-        }
-        return $this;
-    }
-
-    /**
-     * Set multiple developer tags for the video as strings.
-     *
-     * @param array $developerTags Array of developerTag for the video
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
-     */
-    public function setVideoDeveloperTags($developerTags)
-    {
-        foreach($developerTags as $developerTag) {
-            $this->addVideoDeveloperTag($developerTag);
-        }
-        return $this;
-    }
-
-
-    /**
-     * Get the current publishing state of the video.
-     *
-     * @return Zend_Gdata_YouTube_Extension_State|null The publishing state of this video
-     */
-    public function getVideoState()
-    {
-        $control = $this->getControl();
-        if ($control != null &&
-            $control->getDraft() != null &&
-            $control->getDraft()->getText() == 'yes') {
-
-            return $control->getState();
-        }
-        return null;
-    }
-
-    /**
-     * Get the VideoEntry's Zend_Gdata_YouTube_Extension_MediaGroup object.
-     * If the mediaGroup does not exist, then set it.
-     *
-     * @return void
-     */
-    public function ensureMediaGroupIsNotNull()
-    {
-        if ($this->getMediagroup() == null) {
-            $this->setMediagroup(new Zend_Gdata_YouTube_Extension_MediaGroup());
-        }
-    }
-
-    /**
-     * Helper function to conveniently set a video's rating.
-     *
-     * @param integer $ratingValue A number representing the rating. Must
-     *          be between 1 and 5 inclusive.
-     * @throws Zend_Gdata_Exception
-     * @return Zend_Gdata_YouTube_VideoEntry Provides a fluent interface.
-     */
-    public function setVideoRating($ratingValue)
-    {
-        if ($ratingValue < 1 || $ratingValue > 5) {
-            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-            throw new Zend_Gdata_App_InvalidArgumentException(
-                'Rating for video entry must be between 1 and 5 inclusive.');
-        }
-
-         require_once 'Zend/Gdata/Extension/Rating.php';
-         $rating = new Zend_Gdata_Extension_Rating(null, 1, 5, null,
-            $ratingValue);
-        $this->setRating($rating);
-        return $this;
-    }
-
-    /**
-     * Retrieve the URL for a video's comment feed.
-     *
-     * @return string|null The URL if found, or null if not found.
-     */
-    public function getVideoCommentFeedUrl()
-    {
-        $commentsExtension = $this->getComments();
-        $commentsFeedUrl = null;
-        if ($commentsExtension) {
-            $commentsFeedLink = $commentsExtension->getFeedLink();
-            if ($commentsFeedLink) {
-                $commentsFeedUrl = $commentsFeedLink->getHref();
-            }
-        }
-        return $commentsFeedUrl;
-    }
-
-}

+ 0 - 65
library/Zend/Gdata/YouTube/VideoFeed.php

@@ -1,65 +0,0 @@
-<?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_Media_Feed
- */
-require_once 'Zend/Gdata/Media/Feed.php';
-
-/**
- * @see Zend_Gdata_YouTube_VideoEntry
- */
-require_once 'Zend/Gdata/YouTube/VideoEntry.php';
-
-/**
- * The YouTube video flavor of an Atom Feed with media support
- *
- * @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_VideoFeed extends Zend_Gdata_Media_Feed
-{
-
-    /**
-     * The classname for individual feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_YouTube_VideoEntry';
-
-    /**
-     * Creates a Video feed, representing a list of videos
-     *
-     * @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);
-    }
-
-}

+ 0 - 540
library/Zend/Gdata/YouTube/VideoQuery.php

@@ -1,540 +0,0 @@
-<?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$
- */
-
-/**
- * Zend_Gdata_YouTube
- */
-require_once('Zend/Gdata/YouTube.php');
-
-/**
- * Zend_Gdata_Query
- */
-require_once('Zend/Gdata/Query.php');
-
-/**
- * Assists in constructing queries for YouTube videos
- *
- * @link http://code.google.com/apis/youtube/
- *
- * @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_VideoQuery extends Zend_Gdata_Query
-{
-
-    /**
-     * Create Gdata_YouTube_VideoQuery object
-     */
-    public function __construct($url = null)
-    {
-        parent::__construct($url);
-    }
-
-    /**
-     * Sets the type of feed this query should be used to search
-     *
-     * @param string $feedType The type of feed
-     * @param string $videoId The ID of the video associated with this query
-     * @param string $entry The ID of the entry associated with this query
-     */
-    public function setFeedType($feedType, $videoId = null, $entry = null)
-    {
-        switch ($feedType) {
-        case 'top rated':
-            $this->_url = Zend_Gdata_YouTube::STANDARD_TOP_RATED_URI;
-            break;
-        case 'most viewed':
-            $this->_url = Zend_Gdata_YouTube::STANDARD_MOST_VIEWED_URI;
-            break;
-        case 'recently featured':
-            $this->_url = Zend_Gdata_YouTube::STANDARD_RECENTLY_FEATURED_URI;
-            break;
-        case 'mobile':
-            $this->_url = Zend_Gdata_YouTube::STANDARD_WATCH_ON_MOBILE_URI;
-            break;
-        case 'related':
-            if ($videoId === null) {
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_InvalidArgumentException(
-                    'Video ID must be set for feed of type: ' . $feedType);
-            } else {
-                $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . $videoId .
-                    '/related';
-            }
-            break;
-        case 'responses':
-            if ($videoId === null) {
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_Exception(
-                    'Video ID must be set for feed of type: ' . $feedType);
-            } else {
-                $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . $videoId .
-                    '/responses';
-            }
-            break;
-        case 'comments':
-            if ($videoId === null) {
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_Exception(
-                    'Video ID must be set for feed of type: ' . $feedType);
-            } else {
-                $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' .
-                    $videoId . '/comments';
-                if ($entry !== null) {
-                    $this->_url .= '/' . $entry;
-                }
-            }
-            break;
-        default:
-            require_once 'Zend/Gdata/App/Exception.php';
-            throw new Zend_Gdata_App_Exception('Unknown feed type');
-            break;
-        }
-    }
-
-    /**
-     * Sets the location parameter for the query
-     *
-     * @param string $value
-     * @throws Zend_Gdata_App_InvalidArgumentException
-     * @return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
-     */
-    public function setLocation($value)
-    {
-        switch($value) {
-            case null:
-                unset($this->_params['location']);
-            default:
-                $parameters = explode(',', $value);
-                if (count($parameters) != 2) {
-                    require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                    throw new Zend_Gdata_App_InvalidArgumentException(
-                        'You must provide 2 coordinates to the location ' .
-                        'URL parameter');
-                }
-
-                foreach($parameters as $param) {
-                    $temp = trim($param);
-                    // strip off the optional exclamation mark for numeric check
-                    if (substr($temp, -1) == '!') {
-                        $temp = substr($temp, 0, -1);
-                    }
-                    if (!is_numeric($temp)) {
-                        require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                        throw new Zend_Gdata_App_InvalidArgumentException(
-                            'Value provided to location parameter must' .
-                            ' be in the form of two coordinates');
-                    }
-                }
-                $this->_params['location'] = $value;
-        }
-    }
-
-    /**
-     * Get the value of the location parameter
-     *
-     * @return string|null Return the location if it exists, null otherwise.
-     */
-    public function getLocation()
-    {
-        if (array_key_exists('location', $this->_params)) {
-            return $this->_params['location'];
-        } else {
-            return null;
-        }
-    }
-
-
-    /**
-     * Sets the location-radius parameter for the query
-     *
-     * @param string $value
-     * @return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
-     */
-    public function setLocationRadius($value)
-    {
-        switch($value) {
-            case null:
-                unset($this->_params['location-radius']);
-            default:
-                $this->_params['location-radius'] = $value;
-        }
-    }
-
-    /**
-     * Get the value of the location-radius parameter
-     *
-     * @return string|null Return the location-radius if it exists,
-     * null otherwise.
-     */
-    public function getLocationRadius()
-    {
-        if (array_key_exists('location-radius', $this->_params)) {
-            return $this->_params['location-radius'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Sets the time period over which this query should apply
-     *
-     * @param string $value
-     * @throws Zend_Gdata_App_InvalidArgumentException
-     * @return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
-     */
-    public function setTime($value = null)
-    {
-        switch ($value) {
-            case 'today':
-                $this->_params['time'] = 'today';
-                break;
-            case 'this_week':
-                $this->_params['time'] = 'this_week';
-                break;
-            case 'this_month':
-                $this->_params['time'] = 'this_month';
-                break;
-            case 'all_time':
-                $this->_params['time'] = 'all_time';
-                break;
-            case null:
-                unset($this->_params['time']);
-            default:
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_InvalidArgumentException(
-                    'Unknown time value');
-                break;
-        }
-        return $this;
-    }
-
-    /**
-     * Sets the value of the uploader parameter
-     *
-     * @param string $value The value of the uploader parameter. Currently this
-     *        can only be set to the value of 'partner'.
-     * @throws Zend_Gdata_App_InvalidArgumentException
-     * @return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
-     */
-    public function setUploader($value = null)
-    {
-        switch ($value) {
-            case 'partner':
-                $this->_params['uploader'] = 'partner';
-                break;
-            case null:
-                unset($this->_params['uploader']);
-                break;
-            default:
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_InvalidArgumentException(
-                    'Unknown value for uploader');
-        }
-        return $this;
-    }
-
-    /**
-     * Sets the formatted video query (vq) URL param value
-     *
-     * @param string $value
-     * @return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
-     */
-    public function setVideoQuery($value = null)
-    {
-        if ($value != null) {
-            $this->_params['vq'] = $value;
-        } else {
-            unset($this->_params['vq']);
-        }
-        return $this;
-    }
-
-    /**
-     * Sets the param to return videos of a specific format
-     *
-     * @param string $value
-     * @return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
-     */
-    public function setFormat($value = null)
-    {
-        if ($value != null) {
-            $this->_params['format'] = $value;
-        } else {
-            unset($this->_params['format']);
-        }
-        return $this;
-    }
-
-    /**
-     * Sets whether or not to include racy videos in the search results
-     *
-     * @param string $value
-     * @return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
-     */
-    public function setRacy($value = null)
-    {
-        switch ($value) {
-            case 'include':
-                $this->_params['racy'] = $value;
-                break;
-            case 'exclude':
-                $this->_params['racy'] = $value;
-                break;
-            case null:
-                unset($this->_params['racy']);
-                break;
-        }
-        return $this;
-    }
-
-    /**
-     * Whether or not to include racy videos in the search results
-     *
-     * @return string|null The value of racy if it exists, null otherwise.
-     */
-    public function getRacy()
-    {
-        if (array_key_exists('racy', $this->_params)) {
-            return $this->_params['racy'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Set the safeSearch parameter
-     *
-     * @param string $value The value of the parameter, currently only 'none',
-     *        'moderate' or 'strict' are allowed values.
-     * @throws Zend_Gdata_App_InvalidArgumentException
-     * @return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface
-     */
-    public function setSafeSearch($value)
-    {
-        switch ($value) {
-            case 'none':
-                $this->_params['safeSearch'] = 'none';
-                break;
-            case 'moderate':
-                $this->_params['safeSearch'] = 'moderate';
-                break;
-            case 'strict':
-                $this->_params['safeSearch'] = 'strict';
-                break;
-            case null:
-                unset($this->_params['safeSearch']);
-            default:
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_InvalidArgumentException(
-                    'The safeSearch parameter only supports the values '.
-                    '\'none\', \'moderate\' or \'strict\'.');
-        }
-    }
-
-    /**
-     * Return the value of the safeSearch parameter
-     *
-     * @return string|null The value of the safeSearch parameter if it has been
-     *         set, null otherwise.
-     */
-    public function getSafeSearch()
-    {
-        if (array_key_exists('safeSearch', $this->_params)) {
-            return $this->_params['safeSearch'];
-        }
-        return $this;
-    }
-
-    /**
-     * Set the value of the orderby parameter
-     *
-     * @param string $value
-     * @return Zend_Gdata_YouTube_Query Provides a fluent interface
-     */
-    public function setOrderBy($value)
-    {
-        if ($value != null) {
-            $this->_params['orderby'] = $value;
-        } else {
-            unset($this->_params['orderby']);
-        }
-        return $this;
-    }
-
-    /**
-     * Return the value of the format parameter
-     *
-     * @return string|null The value of format if it exists, null otherwise.
-     */
-    public function getFormat()
-    {
-        if (array_key_exists('format', $this->_params)) {
-            return $this->_params['format'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Return the value of the video query that has been set
-     *
-     * @return string|null The value of the video query if it exists,
-     *         null otherwise.
-     */
-    public function getVideoQuery()
-    {
-        if (array_key_exists('vq', $this->_params)) {
-            return $this->_params['vq'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Return the value of the time parameter
-     *
-     * @return string|null The time parameter if it exists, null otherwise.
-     */
-    public function getTime()
-    {
-        if (array_key_exists('time', $this->_params)) {
-            return $this->_params['time'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Return the value of the orderby parameter if it exists
-     *
-     * @return string|null The value of orderby if it exists, null otherwise.
-     */
-    public function getOrderBy()
-    {
-        if (array_key_exists('orderby', $this->_params)) {
-            return $this->_params['orderby'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Generate the query string from the URL parameters, optionally modifying
-     * them based on protocol version.
-     *
-     * @param integer $majorProtocolVersion The major protocol version
-     * @param integer $minorProtocolVersion The minor protocol version
-     * @throws Zend_Gdata_App_VersionException
-     * @return string querystring
-     */
-    public function getQueryString($majorProtocolVersion = null,
-        $minorProtocolVersion = null)
-    {
-        $queryArray = array();
-
-        foreach ($this->_params as $name => $value) {
-            if (substr($name, 0, 1) == '_') {
-                continue;
-            }
-
-            switch($name) {
-                case 'location-radius':
-                    if ($majorProtocolVersion == 1) {
-                        require_once 'Zend/Gdata/App/VersionException.php';
-                        throw new Zend_Gdata_App_VersionException("The $name " .
-                            "parameter is only supported in version 2.");
-                    }
-                    break;
-
-                case 'racy':
-                    if ($majorProtocolVersion == 2) {
-                        require_once 'Zend/Gdata/App/VersionException.php';
-                        throw new Zend_Gdata_App_VersionException("The $name " .
-                            "parameter is not supported in version 2. " .
-                            "Please use 'safeSearch'.");
-                    }
-                    break;
-
-                case 'safeSearch':
-                    if ($majorProtocolVersion == 1) {
-                        require_once 'Zend/Gdata/App/VersionException.php';
-                        throw new Zend_Gdata_App_VersionException("The $name " .
-                            "parameter is only supported in version 2. " .
-                            "Please use 'racy'.");
-                    }
-                    break;
-
-                case 'uploader':
-                    if ($majorProtocolVersion == 1) {
-                        require_once 'Zend/Gdata/App/VersionException.php';
-                        throw new Zend_Gdata_App_VersionException("The $name " .
-                            "parameter is only supported in version 2.");
-                    }
-                    break;
-
-                case 'vq':
-                    if ($majorProtocolVersion == 2) {
-                        $name = 'q';
-                    }
-                    break;
-            }
-
-            $queryArray[] = urlencode($name) . '=' . urlencode($value);
-
-        }
-        if (count($queryArray) > 0) {
-            return '?' . implode('&', $queryArray);
-        } else {
-            return '';
-        }
-    }
-
-    /**
-     * Returns the generated full query URL, optionally modifying it based on
-     * the protocol version.
-     *
-     * @param integer $majorProtocolVersion The major protocol version
-     * @param integer $minorProtocolVersion The minor protocol version
-     * @return string The URL
-     */
-    public function getQueryUrl($majorProtocolVersion = null,
-        $minorProtocolVersion = null)
-    {
-        if (isset($this->_url)) {
-            $url = $this->_url;
-        } else {
-            $url = Zend_Gdata_YouTube::VIDEO_URI;
-        }
-        if ($this->getCategory() !== null) {
-            $url .= '/-/' . $this->getCategory();
-        }
-        $url = $url . $this->getQueryString($majorProtocolVersion,
-            $minorProtocolVersion);
-        return $url;
-    }
-
-}

+ 0 - 21
tests/TestConfiguration.php.dist

@@ -277,27 +277,6 @@ defined('TESTS_ZEND_GDATA_GAPPS_PASSWORD') || define('TESTS_ZEND_GDATA_GAPPS_PAS
 defined('TESTS_ZEND_GDATA_BOOKS_ONLINE_ENABLED') || define('TESTS_ZEND_GDATA_BOOKS_ONLINE_ENABLED', false);
 
 /*
- * This indicates that online tests for the YouTube data API should
- * be performed.
- */
-defined('TESTS_ZEND_GDATA_YOUTUBE_ONLINE_ENABLED') || define('TESTS_ZEND_GDATA_YOUTUBE_ONLINE_ENABLED', false);
-
-/*
- * This is the username to use for retrieving subscriptions, etc
- */
-defined('TESTS_ZEND_GDATA_YOUTUBE_ACCOUNT') || define('TESTS_ZEND_GDATA_YOUTUBE_ACCOUNT', 'zfgdata');
-
-/*
- * This is the developer key to access the YouTube API
- */
-defined('TESTS_ZEND_GDATA_YOUTUBE_DEVELOPER_KEY') || define('TESTS_ZEND_GDATA_YOUTUBE_DEVELOPER_KEY', 'your_developer_key_here');
-
-/*
- * This is the client ID to access the YouTube API
- */
-defined('TESTS_ZEND_GDATA_YOUTUBE_CLIENT_ID') || define('TESTS_ZEND_GDATA_YOUTUBE_CLIENT_ID', 'ZF_UnitTests_unknown');
-
-/*
  * This indicates that online tests for the Google Documents API should
  * be performed.
  */

+ 0 - 38
tests/Zend/Gdata/AllTests.php

@@ -155,23 +155,6 @@ require_once 'Zend/Gdata/Gapps/UserEntryTest.php';
 require_once 'Zend/Gdata/Gapps/UserFeedTest.php';
 require_once 'Zend/Gdata/Gapps/UserQueryTest.php';
 
-require_once 'Zend/Gdata/YouTube/PlaylistListFeedTest.php';
-require_once 'Zend/Gdata/YouTube/PlaylistListEntryTest.php';
-require_once 'Zend/Gdata/YouTube/SubscriptionFeedTest.php';
-require_once 'Zend/Gdata/YouTube/SubscriptionEntryTest.php';
-require_once 'Zend/Gdata/YouTube/PlaylistVideoEntryTest.php';
-require_once 'Zend/Gdata/YouTube/VideoEntryTest.php';
-require_once 'Zend/Gdata/YouTube/PlaylistVideoFeedTest.php';
-require_once 'Zend/Gdata/YouTube/VideoFeedTest.php';
-require_once 'Zend/Gdata/YouTube/UserProfileEntryTest.php';
-require_once 'Zend/Gdata/YouTube/CommentFeedTest.php';
-require_once 'Zend/Gdata/YouTube/CommentEntryTest.php';
-require_once 'Zend/Gdata/YouTube/ContactFeedTest.php';
-require_once 'Zend/Gdata/YouTube/ContactEntryTest.php';
-require_once 'Zend/Gdata/YouTube/VideoQueryTest.php';
-require_once 'Zend/Gdata/YouTube/ActivityFeedTest.php';
-require_once 'Zend/Gdata/YouTube/ActivityEntryTest.php';
-
 require_once 'Zend/Gdata/Books/CollectionFeedTest.php';
 require_once 'Zend/Gdata/Books/CollectionEntryTest.php';
 require_once 'Zend/Gdata/Books/VolumeFeedTest.php';
@@ -187,7 +170,6 @@ require_once 'Zend/Gdata/SpreadsheetsOnlineTest.php';
 require_once 'Zend/Gdata/DocsOnlineTest.php';
 require_once 'Zend/Gdata/PhotosOnlineTest.php';
 require_once 'Zend/Gdata/GappsOnlineTest.php';
-require_once 'Zend/Gdata/YouTubeOnlineTest.php';
 require_once 'Zend/Gdata/BooksOnlineTest.php';
 require_once 'Zend/Gdata/SkipTests.php';
 
@@ -334,22 +316,6 @@ class Zend_Gdata_AllTests
         $suite->addTestSuite('Zend_Gdata_Gapps_UserFeedTest');
         $suite->addTestSuite('Zend_Gdata_Gapps_UserQueryTest');
 
-        $suite->addTestSuite('Zend_Gdata_YouTube_PlaylistListFeedTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_PlaylistListEntryTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_SubscriptionFeedTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_SubscriptionEntryTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_PlaylistVideoEntryTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_VideoEntryTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_PlaylistVideoFeedTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_VideoFeedTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_UserProfileEntryTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_CommentFeedTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_CommentEntryTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_ContactFeedTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_ContactEntryTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_ActivityEntryTest');
-        $suite->addTestSuite('Zend_Gdata_YouTube_ActivityFeedTest');
-
         $suite->addTestSuite('Zend_Gdata_Books_CollectionEntryTest');
         $suite->addTestSuite('Zend_Gdata_Books_CollectionFeedTest');
         $suite->addTestSuite('Zend_Gdata_Books_VolumeEntryTest');
@@ -406,10 +372,6 @@ class Zend_Gdata_AllTests
             constant('TESTS_ZEND_GDATA_GAPPS_ONLINE_ENABLED') == true) {
                 $suite->addTestSuite('Zend_Gdata_GappsOnlineTest');
             }
-            if (defined('TESTS_ZEND_GDATA_YOUTUBE_ONLINE_ENABLED') &&
-            constant('TESTS_ZEND_GDATA_YOUTUBE_ONLINE_ENABLED') == true) {
-                $suite->addTestSuite('Zend_Gdata_YouTubeOnlineTest');
-            }
         }
         if ($skippingOnlineTests) {
             $suite->addTestSuite('Zend_Gdata_SkipOnlineTest');

+ 0 - 153
tests/Zend/Gdata/YouTube/ActivityEntryTest.php

@@ -1,153 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/ActivityEntry.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_ActivityEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml',
-                true);
-        $this->entry = new Zend_Gdata_YouTube_ActivityEntry();
-        $this->entry->setMajorProtocolVersion(2);
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($activityEntry) {
-        $this->assertEquals(
-            'tag:youtube.com,2008:event:Z2RweXRob24xMTIzNDMwMDAyMzI5NTQ2N' .
-            'zg2MA%3D%3D',
-            $activityEntry->id->text);
-        $this->assertEquals('2009-01-16T09:13:49.000-08:00',
-            $activityEntry->updated->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/userevents.cat',
-            $activityEntry->category[0]->scheme);
-        $this->assertEquals('video_favorited',
-            $activityEntry->category[0]->term);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind',
-            $activityEntry->category[1]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#userEvent',
-            $activityEntry->category[1]->term);
-        $this->assertEquals('tayzonzay has favorited a video',
-            $activityEntry->title->text);;
-
-        $this->assertEquals('self', $activityEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $activityEntry->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/events/VGF5Wm9uZGF5MzEyaIl2' .
-            'MTMxOTcxMDk3NzQ5MzM%3D?v=2',
-            $activityEntry->getLink('self')->href);
-
-        $this->assertEquals('alternate',
-            $activityEntry->getLink('alternate')->rel);
-        $this->assertEquals('text/html',
-            $activityEntry->getLink('alternate')->type);
-        $this->assertEquals('http://www.youtube.com',
-            $activityEntry->getLink('alternate')->href);
-
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#video',
-            $activityEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#video')->rel);
-        $this->assertEquals('application/atom+xml', $activityEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#video')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/videos/z3U0kuLH974?v=2',
-            $activityEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#video')->href);
-
-        $this->assertEquals('tayzonzay', $activityEntry->author[0]->name->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/tayzonzay',
-            $activityEntry->author[0]->uri->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testEmptyActivityEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newActivityEntry = new Zend_Gdata_YouTube_ActivityEntry();
-        $newActivityEntry->transferFromXML($entryXml);
-        $newActivityEntryXml = $newActivityEntry->saveXML();
-        $this->assertTrue($entryXml == $newActivityEntryXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testHelperMethods() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertEquals('z3U0kuLH974',
-            $this->entry->getVideoId()->getText());
-        $this->assertEquals('foo',
-            $this->entry->getUsername()->getText());
-        $this->assertEquals('2',
-            $this->entry->getRatingValue());
-        $this->assertEquals('video_favorited',
-            $this->entry->getActivityType());
-    }
-
-    public function testConvertActivityEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newActivityEntry = new Zend_Gdata_YouTube_ActivityEntry();
-        $newActivityEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newActivityEntry);
-        $newActivityEntryXml = $newActivityEntry->saveXML();
-        $this->assertEquals($entryXml, $newActivityEntryXml);
-    }
-
-}

+ 0 - 149
tests/Zend/Gdata/YouTube/ActivityFeedTest.php

@@ -1,149 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/ActivityFeed.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_ActivityFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/ActivityFeedDataSample1.xml',
-                true);
-        $this->feed = new Zend_Gdata_YouTube_ActivityFeed();
-        $this->feed->setMajorProtocolVersion(2);
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($activityFeed) {
-        $this->assertEquals('2009-01-28T09:13:49.000-08:00',
-            $activityFeed->updated->text);
-        $this->assertEquals(
-            'http://schemas.google.com/g/2005#kind',
-            $activityFeed->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#userEvent',
-            $activityFeed->category[0]->term);
-        $this->assertEquals('Activity of tayzonzay',
-            $activityFeed->title->text);;
-
-        $this->assertEquals('self', $activityFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $activityFeed->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/events?author=gdpython' .
-            '&start-index=1&max-results=25&v=2',
-            $activityFeed->getLink('self')->href);
-        $this->assertEquals('http://schemas.google.com/g/2005#feed',
-            $activityFeed->getLink(
-                'http://schemas.google.com/g/2005#feed')->rel);
-        $this->assertEquals('application/atom+xml',
-            $activityFeed->getLink(
-                'http://schemas.google.com/g/2005#feed')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/events?v=2',
-            $activityFeed->getLink(
-                'http://schemas.google.com/g/2005#feed')->href);
-        $this->assertEquals('http://schemas.google.com/g/2005#batch',
-            $activityFeed->getLink(
-                'http://schemas.google.com/g/2005#batch')->rel);
-        $this->assertEquals('application/atom+xml',
-            $activityFeed->getLink(
-                'http://schemas.google.com/g/2005#batch')->type);
-        $this->assertEquals(
-            'application/atom+xml',
-            $activityFeed->getLink(
-                'http://schemas.google.com/g/2005#batch')->type);
-        $this->assertEquals('service',
-            $activityFeed->getLink('service')->rel);
-        $this->assertEquals('application/atomsvc+xml',
-            $activityFeed->getLink('service')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/events?alt=atom-service&v=2',
-            $activityFeed->getLink('service')->href);
-
-        $this->assertEquals('YouTube', $activityFeed->author[0]->name->text);
-        $this->assertEquals('http://www.youtube.com/',
-            $activityFeed->author[0]->uri->text);
-        $this->assertEquals(12, $activityFeed->totalResults->text);
-        $this->assertEquals(1, $activityFeed->startIndex->text);
-        $this->assertEquals(25, $activityFeed->itemsPerPage->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testEmptyActivityFeedToAndFromStringShouldMatch() {
-        $entryXml = $this->feed->saveXML();
-        $newActivityFeed = new Zend_Gdata_YouTube_ActivityFeed();
-        $newActivityFeed->transferFromXML($entryXml);
-        $newActivityFeedXml = $newActivityFeed->saveXML();
-        $this->assertTrue($entryXml == $newActivityFeedXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->feed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->feed);
-    }
-
-    public function testConvertActivityFeedToAndFromString() {
-        $this->feed->transferFromXML($this->feedText);
-        $entryXml = $this->feed->saveXML();
-        $newActivityFeed = new Zend_Gdata_YouTube_ActivityFeed();
-        $newActivityFeed->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newActivityFeed);
-        $newActivityFeedXml = $newActivityFeed->saveXML();
-        $this->assertEquals($entryXml, $newActivityFeedXml);
-    }
-
-    public function testEntryCanBeRetrieved() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(count($this->feed->entries) > 0);
-    }
-
-}

+ 0 - 107
tests/Zend/Gdata/YouTube/CommentEntryTest.php

@@ -1,107 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/CommentEntry.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_CommentEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/CommentEntryDataSample1.xml',
-                true);
-        $this->entry = new Zend_Gdata_YouTube_CommentEntry();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($commentEntry) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052',
-            $commentEntry->id->text);
-        $this->assertEquals('2007-09-02T18:00:04.000-07:00', $commentEntry->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $commentEntry->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#comment', $commentEntry->category[0]->term);
-        $this->assertEquals('text', $commentEntry->title->type);
-        $this->assertEquals('how to turn ...', $commentEntry->title->text);;
-        $this->assertEquals('text', $commentEntry->content->type);
-        $this->assertEquals('how to turn rejection and heartbreak into something positive is the big mystery of life but you\'re managed to turn it to your advantage with a beautiful song. Who was she?', $commentEntry->content->text);;
-        $this->assertEquals('self', $commentEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $commentEntry->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052', $commentEntry->getLink('self')->href);
-        $this->assertEquals('reneemathome', $commentEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/reneemathome', $commentEntry->author[0]->uri->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testEmptyCommentEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newCommentEntry = new Zend_Gdata_YouTube_CommentEntry();
-        $newCommentEntry->transferFromXML($entryXml);
-        $newCommentEntryXml = $newCommentEntry->saveXML();
-        $this->assertTrue($entryXml == $newCommentEntryXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testConvertCommentEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newCommentEntry = new Zend_Gdata_YouTube_CommentEntry();
-        $newCommentEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newCommentEntry);
-        $newCommentEntryXml = $newCommentEntry->saveXML();
-        $this->assertEquals($entryXml, $newCommentEntryXml);
-    }
-
-}

+ 0 - 109
tests/Zend/Gdata/YouTube/CommentFeedTest.php

@@ -1,109 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/CommentFeed.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_CommentFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/CommentFeedDataSample1.xml',
-                true);
-        $this->feed = new Zend_Gdata_YouTube_CommentFeed();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($commentFeed) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments',
-            $commentFeed->id->text);
-        $this->assertEquals('2007-09-21T02:32:55.032Z', $commentFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $commentFeed->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#comment', $commentFeed->category[0]->term);
-        $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $commentFeed->logo->text);
-        $this->assertEquals('text', $commentFeed->title->type);
-        $this->assertEquals('Comments on \'"That Girl" - Original Song - Acoustic Version\'', $commentFeed->title->text);;
-        $this->assertEquals('self', $commentFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $commentFeed->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments?start-index=1&max-results=4', $commentFeed->getLink('self')->href);
-        $this->assertEquals('YouTube', $commentFeed->author[0]->name->text);
-        $this->assertEquals('http://www.youtube.com/', $commentFeed->author[0]->uri->text);
-        $this->assertEquals(100, $commentFeed->totalResults->text);
-        $this->assertEquals(1, $commentFeed->startIndex->text);
-        $this->assertEquals(4, $commentFeed->itemsPerPage->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertTrue(count($this->feed->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertTrue(count($this->feed->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertTrue(count($this->feed->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertTrue(count($this->feed->extensionAttributes) == 0);
-    }
-
-    public function testEmptyCommentFeedToAndFromStringShouldMatch() {
-        $entryXml = $this->feed->saveXML();
-        $newCommentFeed = new Zend_Gdata_YouTube_CommentFeed();
-        $newCommentFeed->transferFromXML($entryXml);
-        $newCommentFeedXml = $newCommentFeed->saveXML();
-        $this->assertTrue($entryXml == $newCommentFeedXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->feed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->feed);
-    }
-
-    public function testConvertCommentFeedToAndFromString() {
-        $this->feed->transferFromXML($this->feedText);
-        $entryXml = $this->feed->saveXML();
-        $newCommentFeed = new Zend_Gdata_YouTube_CommentFeed();
-        $newCommentFeed->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newCommentFeed);
-        $newCommentFeedXml = $newCommentFeed->saveXML();
-        $this->assertEquals($entryXml, $newCommentFeedXml);
-    }
-
-}

+ 0 - 109
tests/Zend/Gdata/YouTube/ContactEntryTest.php

@@ -1,109 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/ContactEntry.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_ContactEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/ContactEntryDataSample1.xml',
-                true);
-        $this->entry = new Zend_Gdata_YouTube_ContactEntry();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($contactEntry) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser',
-            $contactEntry->id->text);
-        $this->assertEquals('2007-09-21T02:44:41.134Z', $contactEntry->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $contactEntry->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#friend', $contactEntry->category[0]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/contact.cat', $contactEntry->category[1]->scheme);
-        $this->assertEquals('Friends', $contactEntry->category[1]->term);
-        $this->assertEquals('text', $contactEntry->title->type);
-        $this->assertEquals('testuser', $contactEntry->title->text);;
-        $this->assertEquals('self', $contactEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $contactEntry->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser', $contactEntry->getLink('self')->href);
-        $this->assertEquals('davidchoimusic', $contactEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $contactEntry->author[0]->uri->text);
-        $this->assertEquals('testuser', $contactEntry->username->text);
-        $this->assertEquals('accepted', $contactEntry->status->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testEmptyContactEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newContactEntry = new Zend_Gdata_YouTube_ContactEntry();
-        $newContactEntry->transferFromXML($entryXml);
-        $newContactEntryXml = $newContactEntry->saveXML();
-        $this->assertTrue($entryXml == $newContactEntryXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testConvertContactEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newContactEntry = new Zend_Gdata_YouTube_ContactEntry();
-        $newContactEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newContactEntry);
-        $newContactEntryXml = $newContactEntry->saveXML();
-        $this->assertEquals($entryXml, $newContactEntryXml);
-    }
-
-}

+ 0 - 109
tests/Zend/Gdata/YouTube/ContactFeedTest.php

@@ -1,109 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/ContactFeed.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_ContactFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/ContactFeedDataSample1.xml',
-                true);
-        $this->feed = new Zend_Gdata_YouTube_ContactFeed();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($contactFeed) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/contacts',
-            $contactFeed->id->text);
-        $this->assertEquals('2007-09-21T02:44:41.135Z', $contactFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $contactFeed->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#friend', $contactFeed->category[0]->term);
-        $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $contactFeed->logo->text);
-        $this->assertEquals('text', $contactFeed->title->type);
-        $this->assertEquals('davidchoimusic\'s Contacts', $contactFeed->title->text);;
-        $this->assertEquals('self', $contactFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $contactFeed->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/contacts?start-index=1&max-results=5', $contactFeed->getLink('self')->href);
-        $this->assertEquals('davidchoimusic', $contactFeed->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $contactFeed->author[0]->uri->text);
-        $this->assertEquals(1558, $contactFeed->totalResults->text);
-        $this->assertEquals(1, $contactFeed->startIndex->text);
-        $this->assertEquals(5, $contactFeed->itemsPerPage->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertTrue(count($this->feed->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertTrue(count($this->feed->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertTrue(count($this->feed->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertTrue(count($this->feed->extensionAttributes) == 0);
-    }
-
-    public function testEmptyContactFeedToAndFromStringShouldMatch() {
-        $entryXml = $this->feed->saveXML();
-        $newContactFeed = new Zend_Gdata_YouTube_ContactFeed();
-        $newContactFeed->transferFromXML($entryXml);
-        $newContactFeedXml = $newContactFeed->saveXML();
-        $this->assertTrue($entryXml == $newContactFeedXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->feed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->feed);
-    }
-
-    public function testConvertContactFeedToAndFromString() {
-        $this->feed->transferFromXML($this->feedText);
-        $entryXml = $this->feed->saveXML();
-        $newContactFeed = new Zend_Gdata_YouTube_ContactFeed();
-        $newContactFeed->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newContactFeed);
-        $newContactFeedXml = $newContactFeed->saveXML();
-        $this->assertEquals($entryXml, $newContactFeedXml);
-    }
-
-}

+ 0 - 217
tests/Zend/Gdata/YouTube/InboxEntryTest.php

@@ -1,217 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/InboxEntry.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_InboxEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/InboxEntryDataSample1.xml',
-                true);
-        $this->v2entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/' .
-                'InboxEntryDataSampleV2.xml',
-                true);
-
-        $this->entry = new Zend_Gdata_YouTube_InboxEntry();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($InboxEntry) {
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74/' .
-            'inbox/ffb9a5f32cd5f55',
-            $InboxEntry->id->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind',
-            $InboxEntry->category[0]->scheme);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#videoMessage',
-            $InboxEntry->category[0]->term);
-        $this->assertEquals('andyland74sFriend sent you a video!',
-            $InboxEntry->title->text);;
-        $this->assertEquals('self',
-            $InboxEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $InboxEntry->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74/' .
-            'inbox/ffb9a5f32cd5f55',
-            $InboxEntry->getLink('self')->href);
-        $this->assertEquals('andyland74sFriend',
-            $InboxEntry->author[0]->name->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74sFriend',
-            $InboxEntry->author[0]->uri->text);
-        $this->assertEquals(
-            'Check out this video!',
-            $InboxEntry->getDescription()->text);
-    }
-
-    public function verifyAllSamplePropertiesAreCorrectV2(
-        $InboxEntry) {
-        $this->assertEquals(
-            'tag:youtube,2008:user:andyland74:inbox:D_uaXzLRX1U',
-            $InboxEntry->id->text);
-        $this->assertEquals('2008-06-10T13:55:32.000-07:00',
-            $InboxEntry->published->text);
-        $this->assertEquals('2008-06-10T13:55:32.000-07:00',
-            $InboxEntry->updated->text);
-        $this->assertEquals(
-            'http://schemas.google.com/g/2005#kind',
-            $InboxEntry->category[0]->scheme);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#videoMessage',
-            $InboxEntry->category[0]->term);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/keywords.cat',
-            $InboxEntry->category[1]->scheme);
-        $this->assertEquals(
-            'surfing',
-            $InboxEntry->category[1]->term);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/categories.cat',
-            $InboxEntry->category[2]->scheme);
-        $this->assertEquals(
-            'People',
-            $InboxEntry->category[2]->term);
-        $this->assertEquals('self',
-            $InboxEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $InboxEntry->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74/' .
-            'inbox/ffb9a5f32cd5f55?v=2',
-            $InboxEntry->getLink('self')->href);
-        $this->assertEquals('related',
-            $InboxEntry->getLink('related')->rel);
-        $this->assertEquals('application/atom+xml',
-            $InboxEntry->getLink('related')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs?v=2',
-            $InboxEntry->getLink('related')->href);
-        $this->assertEquals('alternate',
-            $InboxEntry->getLink('alternate')->rel);
-        $this->assertEquals('text/html',
-            $InboxEntry->getLink('alternate')->type);
-        $this->assertEquals(
-            'http://www.youtube.com/watch?v=jXE6G9CYcJs',
-            $InboxEntry->getLink('alternate')->href);
-        $this->assertEquals('andyland74sFriend',
-            $InboxEntry->author[0]->name->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74sFriend',
-            $InboxEntry->author[0]->uri->text);
-        $this->assertEquals(877, $InboxEntry->getRating()->numRaters);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/comments',
-            $InboxEntry->getComments()->getFeedLink()->getHref());
-        $this->assertEquals(286355,
-            $InboxEntry->getStatistics()->getViewCount());
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElementsV2() {
-        $this->entry->setMajorProtocolVersion(2);
-        $this->entry->transferFromXML($this->v2entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributesV2() {
-        $this->entry->setMajorProtocolVersion(2);
-        $this->entry->transferFromXML($this->v2entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testEmptyInboxEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newInboxEntry = new Zend_Gdata_YouTube_InboxEntry();
-        $newInboxEntry->transferFromXML($entryXml);
-        $newInboxEntryXml = $newInboxEntry->saveXML();
-        $this->assertTrue($entryXml == $newInboxEntryXml);
-    }
-
-    public function testEmptyInboxEntryToAndFromStringShouldMatchV2() {
-        $this->entry->transferFromXML($this->v2entryText);
-        $entryXml = $this->entry->saveXML();
-        $newInboxEntry = new Zend_Gdata_YouTube_InboxEntry();
-        $newInboxEntry->transferFromXML($entryXml);
-        $newInboxEntry->setMajorProtocolVersion(2);
-        $newInboxEntryXml = $newInboxEntry->saveXML();
-        $this->assertTrue($entryXml == $newInboxEntryXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testSamplePropertiesAreCorrectV2 () {
-        $this->entry->setMajorProtocolVersion(2);
-        $this->entry->transferFromXML($this->v2entryText);
-        $this->verifyAllSamplePropertiesAreCorrectV2($this->entry);
-    }
-
-    public function testConvertInboxEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newInboxEntry = new Zend_Gdata_YouTube_InboxEntry();
-        $newInboxEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newInboxEntry);
-        $newInboxEntryXml = $newInboxEntry->saveXML();
-        $this->assertEquals($entryXml, $newInboxEntryXml);
-    }
-
-}

+ 0 - 182
tests/Zend/Gdata/YouTube/InboxFeedTest.php

@@ -1,182 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/InboxFeed.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_InboxFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->feedText = file_get_contents(
-            'Zend/Gdata/YouTube/_files/InboxFeedDataSample1.xml',
-            true);
-        $this->V2feedText = file_get_contents(
-            'Zend/Gdata/YouTube/_files/InboxFeedDataSampleV2.xml',
-            true);
-        $this->feed = new Zend_Gdata_YouTube_InboxFeed();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($inboxFeed) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/users/' .
-            'default/inbox',
-            $inboxFeed->id->text);
-        $this->assertEquals('2008-06-10T20:55:40.271Z',
-            $inboxFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind',
-            $inboxFeed->category[0]->scheme);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#videoMessage',
-            $inboxFeed->category[0]->term);
-        $this->assertEquals(
-            'http://www.youtube.com/img/pic_youtubelogo_123x63.gif',
-            $inboxFeed->logo->text);
-        $this->assertEquals('text', $inboxFeed->title->type);
-        $this->assertEquals('Inbox of andyland74',
-            $inboxFeed->title->text);;
-        $this->assertEquals('self', $inboxFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $inboxFeed->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74/inbox?...',
-            $inboxFeed->getLink('self')->href);
-        $this->assertEquals('andyland74', $inboxFeed->author[0]->name->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74',
-            $inboxFeed->author[0]->uri->text);
-        $this->assertEquals(1, $inboxFeed->totalResults->text);
-    }
-
-    private function verifyAllSamplePropertiesAreCorrectV2 ($inboxFeed) {
-        $this->assertEquals('tag:youtube,2008:user:andyland74:inbox',
-            $inboxFeed->id->text);
-        $this->assertEquals('2008-07-21T17:54:30.236Z',
-            $inboxFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind',
-            $inboxFeed->category[0]->scheme);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#videoMessage',
-            $inboxFeed->category[0]->term);
-        $this->assertEquals(
-            'http://www.youtube.com/img/pic_youtubelogo_123x63.gif',
-            $inboxFeed->logo->text);
-        $this->assertEquals('Inbox of andyland74',
-            $inboxFeed->title->text);;
-        $this->assertEquals('andyland74',
-            $inboxFeed->author[0]->name->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74',
-            $inboxFeed->author[0]->uri->text);
-        $this->assertEquals('self', $inboxFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $inboxFeed->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74/inbox?...',
-            $inboxFeed->getLink('self')->href);
-        $this->assertEquals('alternate', $inboxFeed->getLink('alternate')->rel);
-        $this->assertEquals('text/html',
-            $inboxFeed->getLink('alternate')->type);
-        $this->assertEquals(
-            'http://www.youtube.com/my_messages?folder=inbox&filter=videos',
-            $inboxFeed->getLink('alternate')->href);
-        $this->assertEquals('service', $inboxFeed->getLink('service')->rel);
-        $this->assertEquals('application/atomsvc+xml',
-            $inboxFeed->getLink('service')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/andyland74/inbox?' .
-            'alt=...',
-            $inboxFeed->getLink('service')->href);
-
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testEmptyInboxFeedToAndFromStringShouldMatch() {
-        $feedXml = $this->feed->saveXML();
-        $newInboxFeed = new Zend_Gdata_YouTube_InboxFeed();
-        $newInboxFeed->transferFromXML($feedXml);
-        $newInboxFeedXml = $newInboxFeed->saveXML();
-        $this->assertTrue($feedXml == $newInboxFeedXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->feed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->feed);
-    }
-
-    public function testSamplePropertiesAreCorrectV2 () {
-        $this->feed->transferFromXML($this->V2feedText);
-        $this->verifyAllSamplePropertiesAreCorrectV2($this->feed);
-    }
-
-    public function testConvertInboxFeedToAndFromString() {
-        $this->feed->transferFromXML($this->feedText);
-        $feedXml = $this->feed->saveXML();
-        $newInboxFeed = new Zend_Gdata_YouTube_InboxFeed();
-        $newInboxFeed->transferFromXML($feedXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newInboxFeed);
-        $newInboxFeedXml = $newInboxFeed->saveXML();
-        $this->assertEquals($feedXml, $newInboxFeedXml);
-    }
-
-    public function testConvertInboxFeedToAndFromStringV2() {
-        $this->feed->setMajorProtocolVersion(2);
-        $this->feed->transferFromXML($this->V2feedText);
-        $feedXml = $this->feed->saveXML();
-        $newInboxFeed = new Zend_Gdata_YouTube_InboxFeed();
-        $newInboxFeed->transferFromXML($feedXml);
-        $newInboxFeed->setMajorProtocolVersion(2);
-        $this->verifyAllSamplePropertiesAreCorrectV2($newInboxFeed);
-        $newInboxFeedXml = $newInboxFeed->saveXML();
-        $this->assertEquals($feedXml, $newInboxFeedXml);
-    }
-
-}

+ 0 - 239
tests/Zend/Gdata/YouTube/PlaylistListEntryTest.php

@@ -1,239 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/PlaylistListEntry.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_PlaylistListEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/PlaylistListEntryDataSample1.xml',
-                true);
-        $this->v2entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/PlaylistListEntryDataSampleV2.xml',
-                true);
-        $this->entry = new Zend_Gdata_YouTube_PlaylistListEntry();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($playlistListEntry) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/playlists/46A2F8C9B36B6FE7',
-            $playlistListEntry->id->text);
-        $this->assertEquals('2007-09-20T13:42:19.000-07:00', $playlistListEntry->updated->text);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/tags.cat', $playlistListEntry->category[0]->scheme);
-        $this->assertEquals('music', $playlistListEntry->category[0]->term);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistListEntry->category[1]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlistLink', $playlistListEntry->category[1]->term);
-        $this->assertEquals('text', $playlistListEntry->title->type);
-        $this->assertEquals('YouTube Musicians', $playlistListEntry->title->text);;
-        $this->assertEquals('text', $playlistListEntry->content->type);
-        $this->assertEquals('Music from talented people on YouTube.', $playlistListEntry->content->text);;
-        $this->assertEquals('self', $playlistListEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $playlistListEntry->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/playlists/46A2F8C9B36B6FE7', $playlistListEntry->getLink('self')->href);
-        $this->assertEquals('testuser', $playlistListEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', $playlistListEntry->author[0]->uri->text);
-        $this->assertEquals('Music from talented people on YouTube.', $playlistListEntry->description->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7', $playlistListEntry->getPlaylistVideoFeedUrl());
-        $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7', $playlistListEntry->feedLink[0]->href);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlist', $playlistListEntry->feedLink[0]->rel);
-    }
-
-    private function verifyAllSamplePropertiesAreCorrectV2 ($playlistListEntry) {
-        $this->assertEquals('tag:youtube.com,2008:user:googledevelopers:playlist:8E2186857EE27746',
-            $playlistListEntry->id->text);
-        $this->assertEquals('2008-12-10T09:56:03.000Z', $playlistListEntry->updated->text);
-        $this->assertEquals('2007-08-23T21:48:43.000Z', $playlistListEntry->published->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistListEntry->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlistLink', $playlistListEntry->category[0]->term);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistListEntry->category[0]->scheme);
-        $this->assertEquals('Non-google Interviews', $playlistListEntry->title->text);
-        $this->assertEquals('This playlist contains interviews with people outside of Google.', $playlistListEntry->summary->text);
-
-        $this->assertEquals('self', $playlistListEntry->getLink('self')->rel);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/users/googledevelopers/playlists/8E2186857EE27746?v=2', $playlistListEntry->getLink('self')->href);
-        $this->assertEquals('application/atom+xml', $playlistListEntry->getLink('self')->type);
-        $this->assertEquals('alternate', $playlistListEntry->getLink('alternate')->rel);
-        $this->assertEquals('http://www.youtube.com/view_play_list?p=8E2186857EE27746', $playlistListEntry->getLink('alternate')->href);
-        $this->assertEquals('text/html', $playlistListEntry->getLink('alternate')->type);
-        $this->assertEquals('related', $playlistListEntry->getLink('related')->rel);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/users/googledevelopers?v=2', $playlistListEntry->getLink('related')->href);
-        $this->assertEquals('application/atom+xml', $playlistListEntry->getLink('related')->type);
-        $this->assertEquals('googledevelopers', $playlistListEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/users/googledevelopers', $playlistListEntry->author[0]->uri->text);
-
-        $this->assertEquals('8E2186857EE27746', $playlistListEntry->getPlaylistId()->text);
-        $this->assertEquals('1', $playlistListEntry->getCountHint()->text);
-
-        $this->assertEquals('application/atom+xml;type=feed', $playlistListEntry->getContent()->getType());
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/playlists/8E2186857EE27746?v=2', $playlistListEntry->getContent()->getSrc());
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testEmptyPlaylistListEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newPlaylistListEntry = new Zend_Gdata_YouTube_PlaylistListEntry();
-        $newPlaylistListEntry->transferFromXML($entryXml);
-        $newPlaylistListEntryXml = $newPlaylistListEntry->saveXML();
-        $this->assertTrue($entryXml == $newPlaylistListEntryXml);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElementsV2() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->entry->setMajorProtocolVersion(2);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributesV2() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->entry->setMajorProtocolVersion(2);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testGetFeedLinkReturnsAllStoredEntriesWhenUsedWithNoParameters() {
-        // Prepare test data
-        $entry1 = new Zend_Gdata_Extension_FeedLink();
-        $entry1->rel = "first";
-        $entry1->href= "foo";
-        $entry2 = new Zend_Gdata_Extension_FeedLink();
-        $entry2->rel = "second";
-        $entry2->href= "bar";
-        $data = array($entry1, $entry2);
-
-        // Load test data and run test
-        $this->entry->feedLink = $data;
-        $this->assertEquals(2, count($this->entry->feedLink));
-    }
-
-    public function testGetFeedLinkCanReturnEntriesByRelValue() {
-        // Prepare test data
-        $entry1 = new Zend_Gdata_Extension_FeedLink();
-        $entry1->rel = "first";
-        $entry1->href= "foo";
-        $entry2 = new Zend_Gdata_Extension_FeedLink();
-        $entry2->rel = "second";
-        $entry2->href= "bar";
-        $data = array($entry1, $entry2);
-
-        // Load test data and run test
-        $this->entry->feedLink = $data;
-        $this->assertEquals($entry1, $this->entry->getFeedLink('first'));
-        $this->assertEquals($entry2, $this->entry->getFeedLink('second'));
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testSamplePropertiesAreCorrectV2 () {
-        $this->entry->transferFromXML($this->v2entryText);
-        $this->entry->setMajorProtocolVersion(2);
-        $this->verifyAllSamplePropertiesAreCorrectV2($this->entry);
-    }
-
-    public function testConvertPlaylistListEntryToAndFromStringV2() {
-        $this->entry->transferFromXML($this->v2entryText);
-        $entryXml = $this->entry->saveXML();
-        $newPlaylistListEntry = new Zend_Gdata_YouTube_PlaylistListEntry();
-        $newPlaylistListEntry->transferFromXML($entryXml);
-        $newPlaylistListEntry->setMajorProtocolVersion(2);
-        $this->verifyAllSamplePropertiesAreCorrectV2($newPlaylistListEntry);
-        $newPlaylistListEntryXml = $newPlaylistListEntry->saveXML();
-        $this->assertEquals($entryXml, $newPlaylistListEntryXml);
-    }
-
-    public function testConvertPlaylistListEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newPlaylistListEntry = new Zend_Gdata_YouTube_PlaylistListEntry();
-        $newPlaylistListEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newPlaylistListEntry);
-        $newPlaylistListEntryXml = $newPlaylistListEntry->saveXML();
-        $this->assertEquals($entryXml, $newPlaylistListEntryXml);
-    }
-
-    public function testGettingCountHintOnV1EntryShouldThrowException() {
-        $exceptionCaught = false;
-        $this->entry->transferFromXML($this->entryText);
-        try {
-            $this->entry->getCountHint();
-        } catch (Zend_Gdata_App_VersionException $e) {
-            $exceptionCaught = true;
-        }
-        $this->assertTrue($exceptionCaught, 'Calling getCountHint on a v1 ' .
-            'playlistListEntry should throw an exception');
-    }
-
-    public function testGettingPlaylistIdOnV1EntryShouldThrowException() {
-        $exceptionCaught = false;
-        $this->entry->transferFromXML($this->entryText);
-        try {
-            $this->entry->getPlaylistId();
-        } catch (Zend_Gdata_App_VersionException $e) {
-            $exceptionCaught = true;
-        }
-        $this->assertTrue($exceptionCaught, 'Calling getPlaylistId on a v1 ' .
-            'playlistListEntry should throw an exception');
-    }
-
-    public function testGetPlaylistVideoFeedUrlWorksInV2() {
-        $this->entry->transferFromXML($this->v2entryText);
-        $this->entry->setMajorProtocolVersion(2);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/playlists/8E2186857EE27746?v=2',
-            $this->entry->getPlaylistVideoFeedUrl());
-    }
-}

+ 0 - 171
tests/Zend/Gdata/YouTube/PlaylistListFeedTest.php

@@ -1,171 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/PlaylistListFeed.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_PlaylistListFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/PlaylistListFeedDataSample1.xml',
-                true);
-        $this->V2feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/PlaylistListFeedDataSampleV2.xml',
-                true);
-
-        $this->feed = new Zend_Gdata_YouTube_PlaylistListFeed();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($playlistListFeed) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/playlists',
-            $playlistListFeed->id->text);
-        $this->assertEquals('2007-09-20T20:59:47.530Z', $playlistListFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistListFeed->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlistLink', $playlistListFeed->category[0]->term);
-        $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $playlistListFeed->logo->text);
-        $this->assertEquals('text', $playlistListFeed->title->type);
-        $this->assertEquals('testuser\'s Playlists', $playlistListFeed->title->text);;
-        $this->assertEquals('self', $playlistListFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $playlistListFeed->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/playlists?start-index=1&max-results=25', $playlistListFeed->getLink('self')->href);
-        $this->assertEquals('testuser', $playlistListFeed->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', $playlistListFeed->author[0]->uri->text);
-        $this->assertEquals(2, $playlistListFeed->totalResults->text);
-    }
-
-    private function verifyAllSamplePropertiesAreCorrectV2 ($playlistListFeed) {
-        $this->assertEquals('tag:youtube.com,2008:user:GoogleDevelopers:playlists',
-            $playlistListFeed->id->text);
-        $this->assertEquals('2008-12-10T09:56:03.000Z',
-            $playlistListFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind',
-            $playlistListFeed->category[0]->scheme);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#playlistLink',
-            $playlistListFeed->category[0]->term);
-        $this->assertEquals(
-            'http://www.youtube.com/img/pic_youtubelogo_123x63.gif',
-            $playlistListFeed->logo->text);
-        $this->assertEquals('Playlists of GoogleDevelopers',
-            $playlistListFeed->title->text);;
-        $this->assertEquals('self', $playlistListFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $playlistListFeed->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/GoogleDevelopers/' .
-            'playlists?start-index=1&max-results=25&v=2',
-            $playlistListFeed->getLink('self')->href);
-        $this->assertEquals('GoogleDevelopers',
-            $playlistListFeed->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/users/' .
-            'googledevelopers', $playlistListFeed->author[0]->uri->text);
-        $this->assertEquals(70, $playlistListFeed->totalResults->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElementsV2() {
-        $this->feed->setMajorProtocolVersion(2);
-        $this->feed->transferFromXML($this->V2feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributesV2() {
-        $this->feed->setMajorProtocolVersion(2);
-        $this->feed->transferFromXML($this->V2feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testEmptyPlaylistListFeedToAndFromStringShouldMatch() {
-        $feedXml = $this->feed->saveXML();
-        $newPlaylistListFeed = new Zend_Gdata_YouTube_PlaylistListFeed();
-        $newPlaylistListFeed->transferFromXML($feedXml);
-        $newPlaylistListFeedXml = $newPlaylistListFeed->saveXML();
-        $this->assertTrue($feedXml == $newPlaylistListFeedXml);
-    }
-
-    public function testEmptyPlaylistListFeedToAndFromStringShouldMatchV2() {
-        $this->feed->setMajorProtocolVersion(2);
-        $this->feed->transferFromXML($this->V2feedText);
-        $feedXml = $this->feed->saveXML();
-        $newPlaylistListFeed = new Zend_Gdata_YouTube_PlaylistListFeed();
-        $newPlaylistListFeed->transferFromXML($feedXml);
-        $newPlaylistListFeed->setMajorProtocolVersion(2);
-        $newPlaylistListFeedXml = $newPlaylistListFeed->saveXML();
-        $this->assertTrue($feedXml == $newPlaylistListFeedXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->feed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->feed);
-    }
-
-    public function testSamplePropertiesAreCorrectV2 () {
-        $this->feed->setMajorProtocolVersion(2);
-        $this->feed->transferFromXML($this->V2feedText);
-        $this->verifyAllSamplePropertiesAreCorrectV2($this->feed);
-    }
-
-    public function testConvertPlaylistListFeedToAndFromString() {
-        $this->feed->transferFromXML($this->feedText);
-        $entryXml = $this->feed->saveXML();
-        $newPlaylistListFeed = new Zend_Gdata_YouTube_PlaylistListFeed();
-        $newPlaylistListFeed->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newPlaylistListFeed);
-        $newPlaylistListFeedXml = $newPlaylistListFeed->saveXML();
-        $this->assertEquals($entryXml, $newPlaylistListFeedXml);
-    }
-
-}

+ 0 - 356
tests/Zend/Gdata/YouTube/PlaylistVideoEntryTest.php

@@ -1,356 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/PlaylistVideoEntry.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_PlaylistVideoEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSample1.xml',
-                true);
-        $this->V2entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSampleV2.xml',
-                true);
-        $this->entry = new Zend_Gdata_YouTube_PlaylistVideoEntry();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($playlistVideoEntry) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/efb9b9a8dd4c2b21',
-            $playlistVideoEntry->id->text);
-        $this->assertEquals('2007-09-20T22:56:57.061Z', $playlistVideoEntry->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistVideoEntry->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlist', $playlistVideoEntry->category[0]->term);
-        $this->assertEquals('text', $playlistVideoEntry->title->type);
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $playlistVideoEntry->title->text);;
-        $this->assertEquals('html', $playlistVideoEntry->content->type);
-        $this->assertEquals('self', $playlistVideoEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $playlistVideoEntry->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/efb9b9a8dd4c2b21', $playlistVideoEntry->getLink('self')->href);
-        $this->assertEquals('davidchoimusic', $playlistVideoEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $playlistVideoEntry->author[0]->uri->text);
-        $mediaGroup = $playlistVideoEntry->mediaGroup;
-
-        $this->assertEquals('plain', $mediaGroup->title->type);
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $mediaGroup->title->text);
-        $this->assertEquals('plain', $mediaGroup->description->type);
-        $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $mediaGroup->description->text);
-        $this->assertEquals('music, singing, gnarls, barkley, acoustic, cover', $mediaGroup->keywords->text);
-        $this->assertEquals(255, $mediaGroup->duration->seconds);
-        $this->assertEquals('Music', $mediaGroup->category[0]->label);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $mediaGroup->category[0]->scheme);
-        $this->assertEquals('video', $mediaGroup->content[0]->medium);
-        $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E', $mediaGroup->content[0]->url);
-        $this->assertEquals('application/x-shockwave-flash', $mediaGroup->content[0]->type);
-        $this->assertEquals('true', $mediaGroup->content[0]->isDefault);
-        $this->assertEquals('full', $mediaGroup->content[0]->expression);
-        $this->assertEquals(255, $mediaGroup->content[0]->duration);
-        $this->assertEquals(5, $mediaGroup->content[0]->format);
-
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/2.jpg', $mediaGroup->thumbnail[0]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[0]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[0]->width);
-        $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[0]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/1.jpg', $mediaGroup->thumbnail[1]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[1]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[1]->width);
-        $this->assertEquals('00:01:03.750', $mediaGroup->thumbnail[1]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/3.jpg', $mediaGroup->thumbnail[2]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[2]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[2]->width);
-        $this->assertEquals('00:03:11.250', $mediaGroup->thumbnail[2]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/0.jpg', $mediaGroup->thumbnail[3]->url);
-        $this->assertEquals(240, $mediaGroup->thumbnail[3]->height);
-        $this->assertEquals(320, $mediaGroup->thumbnail[3]->width);
-        $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[3]->time);
-
-        $this->assertEquals(113321, $playlistVideoEntry->statistics->viewCount);
-        $this->assertEquals(1, $playlistVideoEntry->rating->min);
-        $this->assertEquals(5, $playlistVideoEntry->rating->max);
-        $this->assertEquals(1005, $playlistVideoEntry->rating->numRaters);
-        $this->assertEquals(4.77, $playlistVideoEntry->rating->average);
-        $this->assertEquals(1, $playlistVideoEntry->position->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/comments', $playlistVideoEntry->comments->feedLink->href);
-    }
-
-      private function verifyAllSamplePropertiesAreCorrectV2 ($playlistVideoEntry) {
-        $this->assertEquals(
-            'tag:youtube.com,2008:playlist:4E6265CEF8BAA793:579617126485907C',
-            $playlistVideoEntry->id->text);
-        $this->assertEquals('2008-12-16T18:32:03.434Z',
-            $playlistVideoEntry->updated->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/keywords.cat',
-            $playlistVideoEntry->category[0]->scheme);
-        $this->assertEquals('dynamite', $playlistVideoEntry->category[0]->term);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/categories.cat',
-            $playlistVideoEntry->category[1]->scheme);
-        $this->assertEquals('News', $playlistVideoEntry->category[1]->term);
-        $this->assertEquals('News & Politics',
-            $playlistVideoEntry->category[1]->getLabel());
-        $this->assertEquals(
-            'http://schemas.google.com/g/2005#kind',
-            $playlistVideoEntry->category[2]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlist',
-            $playlistVideoEntry->category[2]->term);
-        $this->assertEquals('Paris Police Find Dynamite in Department Store',
-            $playlistVideoEntry->title->text);;
-
-        $this->assertEquals('alternate',
-            $playlistVideoEntry->getLink('alternate')->rel);
-        $this->assertEquals('text/html',
-            $playlistVideoEntry->getLink('alternate')->type);
-        $this->assertEquals(
-            'http://www.youtube.com/watch?v=Lur391T5ApY',
-            $playlistVideoEntry->getLink('alternate')->href);
-
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#video.responses',
-            $playlistVideoEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#video.responses')->rel);
-        $this->assertEquals('application/atom+xml',
-            $playlistVideoEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#video.responses')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/videos/Lur391T5ApY/' .
-            'responses?v=2',
-            $playlistVideoEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#video.responses')->href);
-
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#mobile',
-            $playlistVideoEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#mobile')->rel);
-        $this->assertEquals('text/html',
-            $playlistVideoEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#mobile')->type);
-        $this->assertEquals(
-            'http://m.youtube.com/details?v=Lur391T5ApY',
-            $playlistVideoEntry->getLink(
-                'http://gdata.youtube.com/schemas/2007#mobile')->href);
-
-        $this->assertEquals('related',
-            $playlistVideoEntry->getLink('related')->rel);
-        $this->assertEquals('application/atom+xml',
-            $playlistVideoEntry->getLink('related')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/videos/Lur391T5ApY?v=2',
-            $playlistVideoEntry->getLink('related')->href);
-
-        $this->assertEquals('self',
-            $playlistVideoEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $playlistVideoEntry->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/playlists/4E6265CEF8BAA793/' .
-            '579617126485907C?v=2',
-            $playlistVideoEntry->getLink('self')->href);
-
-        $this->assertEquals('zfgdata',
-            $playlistVideoEntry->author[0]->name->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/zfgdata',
-            $playlistVideoEntry->author[0]->uri->text);
-
-        $mediaGroup = $playlistVideoEntry->mediaGroup;
-
-        $this->assertEquals('plain', $mediaGroup->title->type);
-        $this->assertEquals('Paris Police Find',
-            $mediaGroup->title->text);
-        $this->assertEquals('plain', $mediaGroup->description->type);
-        $this->assertEquals('French police found.',
-            $mediaGroup->description->text);
-        $this->assertEquals(
-            'department, dynamite, explosives, find',
-            $mediaGroup->keywords->text);
-        $this->assertEquals(67, $mediaGroup->duration->seconds);
-        $this->assertEquals('News & Politics',
-            $mediaGroup->category[0]->label);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/categories.cat',
-            $mediaGroup->category[0]->scheme);
-        $this->assertEquals('video', $mediaGroup->content[0]->medium);
-        $this->assertEquals(
-            'http://www.youtube.com/v/Lur391T5ApY&f=gdata_playlists',
-            $mediaGroup->content[0]->url);
-        $this->assertEquals('application/x-shockwave-flash',
-            $mediaGroup->content[0]->type);
-        $this->assertEquals('video',
-            $mediaGroup->content[0]->medium);
-        $this->assertEquals('true', $mediaGroup->content[0]->isDefault);
-        $this->assertEquals('full', $mediaGroup->content[0]->expression);
-        $this->assertEquals(67, $mediaGroup->content[0]->duration);
-        $this->assertEquals(5, $mediaGroup->content[0]->format);
-
-        $this->assertEquals('http://i.ytimg.com/vi/Lur391T5ApY/2.jpg',
-            $mediaGroup->thumbnail[0]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[0]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[0]->width);
-        $this->assertEquals('00:00:33.500', $mediaGroup->thumbnail[0]->time);
-        $this->assertEquals('http://i.ytimg.com/vi/Lur391T5ApY/1.jpg',
-            $mediaGroup->thumbnail[1]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[1]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[1]->width);
-        $this->assertEquals('00:00:16.750', $mediaGroup->thumbnail[1]->time);
-        $this->assertEquals('http://i.ytimg.com/vi/Lur391T5ApY/3.jpg',
-            $mediaGroup->thumbnail[2]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[2]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[2]->width);
-        $this->assertEquals('00:00:50.250', $mediaGroup->thumbnail[2]->time);
-        $this->assertEquals('http://i.ytimg.com/vi/Lur391T5ApY/hqdefault.jpg',
-            $mediaGroup->thumbnail[3]->url);
-        $this->assertEquals(360, $mediaGroup->thumbnail[3]->height);
-        $this->assertEquals(480, $mediaGroup->thumbnail[3]->width);
-        $this->assertEquals('2008-12-16T17:01:42.000Z',
-            $mediaGroup->getUploaded()->text);
-        $this->assertEquals('AssociatedPress',
-            $mediaGroup->getMediaCredit()->text);
-        $this->assertEquals('uploader',
-            $mediaGroup->getMediaCredit()->role);
-        $this->assertEquals('urn:youtube',
-            $mediaGroup->getMediaCredit()->scheme);
-        $this->assertEquals('partner',
-            $mediaGroup->getMediaCredit()->getYTtype());
-        $players = $mediaGroup->getPlayer();
-        $this->assertEquals('http://www.youtube.com/watch?v=Lur391T5ApY',
-            $players[0]->url);
-
-        $this->assertEquals(271, $playlistVideoEntry->statistics->viewCount);
-        $this->assertEquals(1, $playlistVideoEntry->rating->min);
-        $this->assertEquals(5, $playlistVideoEntry->rating->max);
-        $this->assertEquals(5, $playlistVideoEntry->rating->numRaters);
-        $this->assertEquals(4.20, $playlistVideoEntry->rating->average);
-        $this->assertEquals(1, $playlistVideoEntry->position->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/videos/Lur391T5ApY/comments?v=2',
-            $playlistVideoEntry->comments->feedLink->href);
-        $this->assertEquals(4,
-            $playlistVideoEntry->comments->feedLink->countHint);
-        $this->assertEquals('New York, NY',
-            $playlistVideoEntry->getLocation()->text);
-        $this->assertEquals('2008-12-16',
-            $playlistVideoEntry->getRecorded()->text);
-        $this->assertEquals('Lur391T5ApY',
-            $playlistVideoEntry->getVideoId());
-
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElementsV2() {
-        $this->entry->setMajorProtocolVersion(2);
-        $this->entry->transferFromXML($this->V2entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributesV2() {
-        $this->entry->setMajorProtocolVersion(2);
-        $this->entry->transferFromXML($this->V2entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testEmptyPlaylistVideoEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newPlaylistVideoEntry = new Zend_Gdata_YouTube_PlaylistVideoEntry();
-        $newPlaylistVideoEntry->transferFromXML($entryXml);
-        $newPlaylistVideoEntryXml = $newPlaylistVideoEntry->saveXML();
-        $this->assertTrue($entryXml == $newPlaylistVideoEntryXml);
-    }
-
-    public function testEmptyPlaylistVideoEntryToAndFromStringShouldMatchV2() {
-        $this->entry->setMajorProtocolVersion(2);
-        $entryXml = $this->entry->saveXML();
-        $newPlaylistVideoEntry = new Zend_Gdata_YouTube_PlaylistVideoEntry();
-        $newPlaylistVideoEntry->setMajorProtocolVersion(2);
-        $newPlaylistVideoEntry->transferFromXML($entryXml);
-        $newPlaylistVideoEntryXml = $newPlaylistVideoEntry->saveXML();
-        $this->assertTrue($entryXml == $newPlaylistVideoEntryXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testSamplePropertiesAreCorrectV2 () {
-        $this->entry->setMajorProtocolVersion(2);
-        $this->entry->transferFromXML($this->V2entryText);
-        $this->verifyAllSamplePropertiesAreCorrectV2($this->entry);
-    }
-
-    public function testConvertPlaylistVideoEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newPlaylistVideoEntry = new Zend_Gdata_YouTube_PlaylistVideoEntry();
-        $newPlaylistVideoEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newPlaylistVideoEntry);
-        $newPlaylistVideoEntryXml = $newPlaylistVideoEntry->saveXML();
-        $this->assertEquals($entryXml, $newPlaylistVideoEntryXml);
-    }
-
-    public function testConvertPlaylistVideoEntryToAndFromStringV2() {
-        $this->entry->setMajorProtocolVersion(2);
-        $this->entry->transferFromXML($this->V2entryText);
-        $entryXml = $this->entry->saveXML();
-        $newPlaylistVideoEntry = new Zend_Gdata_YouTube_PlaylistVideoEntry();
-        $newPlaylistVideoEntry->setMajorProtocolVersion(2);
-        $newPlaylistVideoEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrectV2($newPlaylistVideoEntry);
-        $newPlaylistVideoEntryXml = $newPlaylistVideoEntry->saveXML();
-        $this->assertEquals($entryXml, $newPlaylistVideoEntryXml);
-    }
-
-}

+ 0 - 112
tests/Zend/Gdata/YouTube/PlaylistVideoFeedTest.php

@@ -1,112 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/PlaylistVideoFeed.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_PlaylistVideoFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/PlaylistVideoFeedDataSample1.xml',
-                true);
-        $this->feed = new Zend_Gdata_YouTube_PlaylistVideoFeed();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($playlistVideoFeed) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7',
-            $playlistVideoFeed->id->text);
-        $this->assertEquals('2007-09-20T13:42:19.000-07:00', $playlistVideoFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistVideoFeed->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlist', $playlistVideoFeed->category[0]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/tags.cat', $playlistVideoFeed->category[1]->scheme);
-        $this->assertEquals('music', $playlistVideoFeed->category[1]->term);
-        $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $playlistVideoFeed->logo->text);
-        $this->assertEquals('text', $playlistVideoFeed->title->type);
-        $this->assertEquals('YouTube Musicians', $playlistVideoFeed->title->text);;
-        $this->assertEquals('self', $playlistVideoFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $playlistVideoFeed->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7?start-index=1&max-results=25', $playlistVideoFeed->getLink('self')->href);
-        $this->assertEquals('testuser', $playlistVideoFeed->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', $playlistVideoFeed->author[0]->uri->text);
-        $this->assertEquals(13, $playlistVideoFeed->totalResults->text);
-        $this->assertEquals(13, count($playlistVideoFeed->entry));
-        $entries = $playlistVideoFeed->entry;
-        $this->assertEquals(1, $entries[0]->getPosition()->getText());
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertTrue(count($this->feed->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertTrue(count($this->feed->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertTrue(count($this->feed->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertTrue(count($this->feed->extensionAttributes) == 0);
-    }
-
-    public function testEmptyPlaylistVideoFeedToAndFromStringShouldMatch() {
-        $entryXml = $this->feed->saveXML();
-        $newPlaylistVideoFeed = new Zend_Gdata_YouTube_PlaylistVideoFeed();
-        $newPlaylistVideoFeed->transferFromXML($entryXml);
-        $newPlaylistVideoFeedXml = $newPlaylistVideoFeed->saveXML();
-        $this->assertTrue($entryXml == $newPlaylistVideoFeedXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->feed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->feed);
-    }
-
-    public function testConvertPlaylistVideoFeedToAndFromString() {
-        $this->feed->transferFromXML($this->feedText);
-        $feedXml = $this->feed->saveXML();
-        $newPlaylistVideoFeed = new Zend_Gdata_YouTube_PlaylistVideoFeed();
-        $newPlaylistVideoFeed->transferFromXML($feedXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newPlaylistVideoFeed);
-        $newPlaylistVideoFeedXml = $newPlaylistVideoFeed->saveXML();
-        $this->assertEquals($feedXml, $newPlaylistVideoFeedXml);
-    }
-
-}

+ 0 - 332
tests/Zend/Gdata/YouTube/SubscriptionEntryTest.php

@@ -1,332 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/SubscriptionEntry.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_SubscriptionEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample1.xml',
-                true);
-        $this->v2entryText_channel = file_get_contents(
-                'Zend/Gdata/YouTube/_files/' .
-                'SubscriptionEntryDataSample_channelV2.xml',
-                true);
-        $this->v2entryText_playlist = file_get_contents(
-                'Zend/Gdata/YouTube/_files/' .
-                'SubscriptionEntryDataSample_playlistV2.xml',
-                true);
-        $this->v2entryText_favorites = file_get_contents(
-                'Zend/Gdata/YouTube/_files/' .
-                'SubscriptionEntryDataSample_favoritesV2.xml',
-                true);
-        $this->v2entryText_query = file_get_contents(
-                'Zend/Gdata/YouTube/_files/' .
-                'SubscriptionEntryDataSample_queryV2.xml',
-                true);
-
-        $this->entry = new Zend_Gdata_YouTube_SubscriptionEntry();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($subscriptionListEntry) {
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/users/testuser/' .
-            'subscriptions/35bbde297dba88db',
-            $subscriptionListEntry->id->text);
-        $this->assertEquals('2007-03-02T11:58:22.000-08:00',
-            $subscriptionListEntry->updated->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat',
-            $subscriptionListEntry->category[1]->scheme);
-        $this->assertEquals('publisher',
-            $subscriptionListEntry->category[1]->term);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind',
-            $subscriptionListEntry->category[0]->scheme);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#subscription',
-            $subscriptionListEntry->category[0]->term);
-        $this->assertEquals('text', $subscriptionListEntry->title->type);
-        $this->assertEquals('Videos published by : BBC',
-            $subscriptionListEntry->title->text);;
-        $this->assertEquals('self',
-            $subscriptionListEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $subscriptionListEntry->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/users/testuser/' .
-            'subscriptions/35bbde297dba88db',
-            $subscriptionListEntry->getLink('self')->href);
-        $this->assertEquals('testuser',
-            $subscriptionListEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser',
-            $subscriptionListEntry->author[0]->uri->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/BBC/uploads',
-            $subscriptionListEntry->feedLink[0]->href);
-        $this->assertEquals('697',
-            $subscriptionListEntry->feedLink[0]->countHint);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#user.uploads',
-            $subscriptionListEntry->feedLink[0]->rel);
-    }
-
-    public function verifyAllSamplePropertiesAreCorrectV2(
-        $subscriptionListEntry) {
-        $this->assertEquals(
-            'tag:youtube.com,2008:user:googledevelopers:subscription:' .
-            'Z1Lm-S9gkRQ',
-            $subscriptionListEntry->id->text);
-        $this->assertEquals('2007-11-16T15:15:17.000-08:00',
-            $subscriptionListEntry->published->text);
-        $this->assertEquals('2007-11-16T15:15:17.000-08:00',
-            $subscriptionListEntry->updated->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat',
-            $subscriptionListEntry->category[0]->scheme);
-        $this->assertEquals('channel',
-            $subscriptionListEntry->category[0]->term);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind',
-            $subscriptionListEntry->category[1]->scheme);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#subscription',
-            $subscriptionListEntry->category[1]->term);
-
-        $this->assertEquals('self',
-            $subscriptionListEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $subscriptionListEntry->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/googledevelopers/' .
-            'subscriptions/Z1Lm-S9gkRQ?v=2',
-            $subscriptionListEntry->getLink('self')->href);
-        $this->assertEquals('related',
-            $subscriptionListEntry->getLink('related')->rel);
-        $this->assertEquals('application/atom+xml',
-            $subscriptionListEntry->getLink('related')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/googledevelopers?v=2',
-            $subscriptionListEntry->getLink('related')->href);
-        $this->assertEquals('alternate',
-            $subscriptionListEntry->getLink('alternate')->rel);
-        $this->assertEquals('text/html',
-            $subscriptionListEntry->getLink('alternate')->type);
-        $this->assertEquals(
-            'http://www.youtube.com/profile_videos?user=androiddevelopers',
-            $subscriptionListEntry->getLink('alternate')->href);
-        $this->assertEquals('GoogleDevelopers',
-            $subscriptionListEntry->author[0]->name->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/googledevelopers',
-            $subscriptionListEntry->author[0]->uri->text);
-        $this->assertEquals('androiddevelopers',
-            $subscriptionListEntry->getUsername()->text);
-        $this->assertEquals('50',
-            $subscriptionListEntry->getCountHint()->text);
-        $thumbnail = $subscriptionListEntry->getMediaThumbnail();
-        $this->assertTrue(
-            $thumbnail instanceof Zend_Gdata_Media_Extension_MediaThumbnail);
-        $this->assertTrue($thumbnail->getUrl() != null);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/' .
-            'androiddevelopers/uploads?v=2',
-            $subscriptionListEntry->getContent()->getSrc());
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElementsV2() {
-        $this->entry->transferFromXML($this->v2entryText_channel);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributesV2() {
-        $this->entry->transferFromXML($this->v2entryText_channel);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testEmptySubscriptionEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newSubscriptionEntry = new Zend_Gdata_YouTube_SubscriptionEntry();
-        $newSubscriptionEntry->transferFromXML($entryXml);
-        $newSubscriptionEntryXml = $newSubscriptionEntry->saveXML();
-        $this->assertTrue($entryXml == $newSubscriptionEntryXml);
-    }
-
-    public function testEmptySubscriptionEntryToAndFromStringShouldMatchV2() {
-        $this->entry->transferFromXML($this->v2entryText_channel);
-        $entryXml = $this->entry->saveXML();
-        $newSubscriptionEntry = new Zend_Gdata_YouTube_SubscriptionEntry();
-        $newSubscriptionEntry->transferFromXML($entryXml);
-        $newSubscriptionEntry->setMajorProtocolVersion(2);
-        $newSubscriptionEntryXml = $newSubscriptionEntry->saveXML();
-        $this->assertTrue($entryXml == $newSubscriptionEntryXml);
-    }
-
-    public function testGetFeedLinkReturnsAllStoredEntriesWhenUsedWithNoParameters() {
-        // Prepare test data
-        $entry1 = new Zend_Gdata_Extension_FeedLink();
-        $entry1->rel = "first";
-        $entry1->href= "foo";
-        $entry2 = new Zend_Gdata_Extension_FeedLink();
-        $entry2->rel = "second";
-        $entry2->href= "bar";
-        $data = array($entry1, $entry2);
-
-        // Load test data and run test
-        $this->entry->feedLink = $data;
-        $this->assertEquals(2, count($this->entry->feedLink));
-    }
-
-    public function testGetFeedLinkCanReturnEntriesByRelValue() {
-        // Prepare test data
-        $entry1 = new Zend_Gdata_Extension_FeedLink();
-        $entry1->rel = "first";
-        $entry1->href= "foo";
-        $entry2 = new Zend_Gdata_Extension_FeedLink();
-        $entry2->rel = "second";
-        $entry2->href= "bar";
-        $data = array($entry1, $entry2);
-
-        // Load test data and run test
-        $this->entry->feedLink = $data;
-        $this->assertEquals($entry1, $this->entry->getFeedLink('first'));
-        $this->assertEquals($entry2, $this->entry->getFeedLink('second'));
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testSamplePropertiesAreCorrectV2 () {
-        $this->entry->transferFromXML($this->v2entryText_channel);
-        $this->entry->setMajorProtocolVersion(2);
-        $this->verifyAllSamplePropertiesAreCorrectV2($this->entry);
-    }
-
-    public function testConvertSubscriptionEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newSubscriptionEntry = new Zend_Gdata_YouTube_SubscriptionEntry();
-        $newSubscriptionEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newSubscriptionEntry);
-        $newSubscriptionEntryXml = $newSubscriptionEntry->saveXML();
-        $this->assertEquals($entryXml, $newSubscriptionEntryXml);
-    }
-
-    public function testExceptionThrownInChannelSubscription() {
-        $this->entry->transferFromXML($this->entryText);
-        $exceptionCaught = false;
-        try {
-            $this->entry->getCountHint();
-        } catch (Zend_Gdata_App_VersionException $e) {
-            $exceptionCaught = true;
-        }
-        $this->assertTrue($exceptionCaught, 'Expected a VersionException on ' .
-            'calling getCountHint() on a v1 subscription entry.');
-    }
-
-    public function testChannelSubscriptionFunctionalityV2() {
-        $this->entry->transferFromXML($this->v2entryText_channel);
-        $this->assertEquals('androiddevelopers',
-            $this->entry->getUsername()->text);
-        $categories = $this->entry->getCategory();
-        foreach($categories as $category) {
-            if ($category->getScheme() ==
-                'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat') {
-                    $this->assertEquals('channel', $category->getTerm());
-            }
-        }
-    }
-
-    public function testPlaylistSubscriptionFunctionalityV2() {
-        $this->entry->transferFromXML($this->v2entryText_playlist);
-        $this->entry->setMajorProtocolVersion(2);
-        $this->assertEquals('From Google Engineers',
-            $this->entry->getPlaylistTitle()->text);
-        $this->assertEquals('4AE5C0D23C2EB82D',
-            $this->entry->getPlaylistId()->text);
-        $categories = $this->entry->getCategory();
-        foreach($categories as $category) {
-            if ($category->getScheme() ==
-                'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat') {
-                    $this->assertEquals('playlist', $category->getTerm());
-            }
-        }
-    }
-
-    public function testFavoritesSubscriptionFunctionalityV2() {
-        $this->entry->transferFromXML($this->v2entryText_favorites);
-        $categories = $this->entry->getCategory();
-        foreach($categories as $category) {
-            if ($category->getScheme() ==
-                'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat') {
-                    $this->assertEquals('favorites', $category->getTerm());
-            }
-        }
-    }
-
-    public function testQuerySubscriptionFunctionalityV2() {
-        $this->entry->transferFromXML($this->v2entryText_query);
-        $categories = $this->entry->getCategory();
-        foreach($categories as $category) {
-            if ($category->getScheme() ==
-                'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat') {
-                    $this->assertEquals('query', $category->getTerm());
-            }
-        }
-    }
-
-}

+ 0 - 178
tests/Zend/Gdata/YouTube/SubscriptionFeedTest.php

@@ -1,178 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/SubscriptionFeed.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_SubscriptionFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/SubscriptionFeedDataSample1.xml',
-                true);
-        $this->V2feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/SubscriptionFeedDataSampleV2.xml',
-                true);
-        $this->feed = new Zend_Gdata_YouTube_SubscriptionFeed();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($subscriptionFeed) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/subscriptions',
-            $subscriptionFeed->id->text);
-        $this->assertEquals('2007-09-20T22:12:45.193Z', $subscriptionFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $subscriptionFeed->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#subscription', $subscriptionFeed->category[0]->term);
-        $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $subscriptionFeed->logo->text);
-        $this->assertEquals('text', $subscriptionFeed->title->type);
-        $this->assertEquals('testuser\'s Subscriptions', $subscriptionFeed->title->text);;
-        $this->assertEquals('self', $subscriptionFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $subscriptionFeed->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/subscriptions?start-index=1&max-results=25', $subscriptionFeed->getLink('self')->href);
-        $this->assertEquals('testuser', $subscriptionFeed->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', $subscriptionFeed->author[0]->uri->text);
-        $this->assertEquals(3, $subscriptionFeed->totalResults->text);
-    }
-
-    private function verifyAllSamplePropertiesAreCorrectV2 ($subscriptionFeed) {
-        $this->assertEquals('tag:youtube.com,2008:user:zfgdata:subscriptions',
-            $subscriptionFeed->id->text);
-        $this->assertEquals('2007-09-20T21:01:13.000-07:00',
-            $subscriptionFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind',
-            $subscriptionFeed->category[0]->scheme);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007#subscription',
-            $subscriptionFeed->category[0]->term);
-        $this->assertEquals(
-            'http://www.youtube.com/img/pic_youtubelogo_123x63.gif',
-            $subscriptionFeed->logo->text);
-        $this->assertEquals('Subscriptions of zfgdata',
-            $subscriptionFeed->title->text);;
-        $this->assertEquals('zfgdata',
-            $subscriptionFeed->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/users/zfgdata',
-            $subscriptionFeed->author[0]->uri->text);
-        // fail because of opensearch issue TODO jhartman -> fix once trevor commits his fix
-        //$this->assertEquals(3, $subscriptionFeed->totalResults->text);
-
-        $this->assertEquals('self', $subscriptionFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml',
-            $subscriptionFeed->getLink('self')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/zfgdata/subscriptions' .
-            '?start-index=1&max-results=25&v=2',
-            $subscriptionFeed->getLink('self')->href);
-        $this->assertEquals('related', $subscriptionFeed->getLink('related')->rel);
-        $this->assertEquals('application/atom+xml',
-            $subscriptionFeed->getLink('related')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/zfgdata?v=2',
-            $subscriptionFeed->getLink('related')->href);
-        $this->assertEquals('alternate', $subscriptionFeed->getLink('alternate')->rel);
-        $this->assertEquals('text/html',
-            $subscriptionFeed->getLink('alternate')->type);
-        $this->assertEquals(
-            'http://www.youtube.com/profile_subscriptions?user=zfgdata',
-            $subscriptionFeed->getLink('alternate')->href);
-        $this->assertEquals('service', $subscriptionFeed->getLink('service')->rel);
-        $this->assertEquals('application/atomsvc+xml',
-            $subscriptionFeed->getLink('service')->type);
-        $this->assertEquals(
-            'http://gdata.youtube.com/feeds/api/users/zfgdata/subscriptions?' .
-            'alt=atom-service&v=2',
-            $subscriptionFeed->getLink('service')->href);
-
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertEquals(0, count($this->feed->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertEquals(0, count($this->feed->extensionAttributes));
-    }
-
-    public function testEmptySubscriptionFeedToAndFromStringShouldMatch() {
-        $feedXml = $this->feed->saveXML();
-        $newSubscriptionFeed = new Zend_Gdata_YouTube_SubscriptionFeed();
-        $newSubscriptionFeed->transferFromXML($feedXml);
-        $newSubscriptionFeedXml = $newSubscriptionFeed->saveXML();
-        $this->assertTrue($feedXml == $newSubscriptionFeedXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->feed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->feed);
-    }
-
-    public function testSamplePropertiesAreCorrectV2 () {
-        $this->feed->transferFromXML($this->V2feedText);
-        $this->verifyAllSamplePropertiesAreCorrectV2($this->feed);
-    }
-
-    public function testConvertSubscriptionFeedToAndFromString() {
-        $this->feed->transferFromXML($this->feedText);
-        $feedXml = $this->feed->saveXML();
-        $newSubscriptionFeed = new Zend_Gdata_YouTube_SubscriptionFeed();
-        $newSubscriptionFeed->transferFromXML($feedXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newSubscriptionFeed);
-        $newSubscriptionFeedXml = $newSubscriptionFeed->saveXML();
-        $this->assertEquals($feedXml, $newSubscriptionFeedXml);
-    }
-
-    public function testConvertSubscriptionFeedToAndFromStringV2() {
-        $this->feed->transferFromXML($this->V2feedText);
-        $this->feed->setMajorProtocolVersion(2);
-        $feedXml = $this->feed->saveXML();
-        $newSubscriptionFeed = new Zend_Gdata_YouTube_SubscriptionFeed();
-        $newSubscriptionFeed->transferFromXML($feedXml);
-        $newSubscriptionFeed->setMajorProtocolVersion(2);
-        $this->verifyAllSamplePropertiesAreCorrectV2($newSubscriptionFeed);
-        $newSubscriptionFeedXml = $newSubscriptionFeed->saveXML();
-        $this->assertEquals($feedXml, $newSubscriptionFeedXml);
-    }
-
-}

+ 0 - 253
tests/Zend/Gdata/YouTube/UserProfileEntryTest.php

@@ -1,253 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/UserProfileEntry.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_UserProfileEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/UserProfileEntryDataSample1.xml',
-                true);
-        $this->V2entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/UserProfileEntryDataSampleV2.xml',
-                true);
-        $this->entry = new Zend_Gdata_YouTube_UserProfileEntry();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($userProfileEntry) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy',
-            $userProfileEntry->id->text);
-        $this->assertEquals('2007-08-13T12:37:03.000-07:00', $userProfileEntry->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $userProfileEntry->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#userProfile', $userProfileEntry->category[0]->term);
-        $this->assertEquals('text', $userProfileEntry->title->type);
-        $this->assertEquals('Darcy', $userProfileEntry->title->text);;
-        $this->assertEquals('self', $userProfileEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $userProfileEntry->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy', $userProfileEntry->getLink('self')->href);
-        $this->assertEquals('Fitzwilliam Darcy', $userProfileEntry->author[0]->name->text);
-        $this->assertEquals(32, $userProfileEntry->age->text);
-        $this->assertEquals('darcy', $userProfileEntry->username->text);
-        $this->assertEquals('A person of great interest', $userProfileEntry->description->text);
-        $this->assertEquals('Pride and Prejudice', $userProfileEntry->books->text);
-        $this->assertEquals('Self employed', $userProfileEntry->company->text);
-        $this->assertEquals('Reading, arguing with Liz', $userProfileEntry->hobbies->text);
-        $this->assertEquals('Steventon', $userProfileEntry->hometown->text);
-        $this->assertEquals('Longbourn in Hertfordshire, Pemberley in Derbyshire', $userProfileEntry->location->text);
-        $this->assertEquals('Pride and Prejudice, 2005', $userProfileEntry->movies->text);
-        $this->assertEquals('Air Con Varizzioni, The Pleasure of the Town', $userProfileEntry->music->text);
-        $this->assertEquals('Gentleman', $userProfileEntry->occupation->text);
-        $this->assertEquals('Home schooling', $userProfileEntry->school->text);
-        $this->assertEquals('m', $userProfileEntry->gender->text);
-        $this->assertEquals('taken', $userProfileEntry->relationship->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy', $userProfileEntry->author[0]->uri->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/favorites', $userProfileEntry->feedLink[0]->href);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.favorites', $userProfileEntry->feedLink[0]->rel);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/contacts', $userProfileEntry->feedLink[1]->href);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.contacts', $userProfileEntry->feedLink[1]->rel);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/inbox', $userProfileEntry->feedLink[2]->href);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.inbox', $userProfileEntry->feedLink[2]->rel);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/playlists', $userProfileEntry->feedLink[3]->href);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.playlists', $userProfileEntry->feedLink[3]->rel);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/subscriptions', $userProfileEntry->feedLink[4]->href);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.subscriptions', $userProfileEntry->feedLink[4]->rel);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/uploads', $userProfileEntry->feedLink[5]->href);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.uploads', $userProfileEntry->feedLink[5]->rel);
-    }
-
-    private function verifyAllSamplePropertiesAreCorrectV2 ($userProfileEntry) {
-        $this->assertEquals('tag:youtube.com,2008:user:zfgdata',
-            $userProfileEntry->id->text);
-        $this->assertEquals('2008-12-15T13:30:56.000-08:00',
-            $userProfileEntry->updated->text);
-        $this->assertEquals(
-            'http://gdata.youtube.com/schemas/2007/channeltypes.cat',
-            $userProfileEntry->category[0]->scheme);
-        $this->assertEquals(
-            'Standard',
-            $userProfileEntry->category[0]->term);
-        $this->assertEquals('zfgdata Channel',
-            $userProfileEntry->title->text);;
-        $this->assertEquals('self', $userProfileEntry->getLink('self')->rel);
-        $this->assertEquals("I'm a lonely test account, with little to do " .
-            "but sit\naround and wait for people to use me. I get bored in " .
-            "between\nreleases and often sleep to pass the time. Please use " .
-            "me more\noften, as I love to show off my talent in breaking " .
-            "your\ncode.", $userProfileEntry->getAboutMe()->text);
-        $this->assertEquals('88',
-            $userProfileEntry->getStatistics()->getViewCount());
-        $thumbnail = $userProfileEntry->getThumbnail();
-        $this->assertTrue(
-            $thumbnail instanceof Zend_Gdata_Media_Extension_MediaThumbnail);
-        $this->assertTrue($thumbnail->getUrl() != null);
-        $this->assertEquals('TestAccount',
-            $userProfileEntry->getLastName()->text);
-        $this->assertEquals('Lonely',
-            $userProfileEntry->getFirstName()->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElementsV2() {
-        $this->entry->transferFromXML($this->V2entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertEquals(0, count($this->entry->extensionElements));
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributesV2() {
-        $this->entry->transferFromXML($this->V2entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertEquals(0, count($this->entry->extensionAttributes));
-    }
-
-    public function testEmptyUserProfileEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newUserProfileEntry = new Zend_Gdata_YouTube_UserProfileEntry();
-        $newUserProfileEntry->transferFromXML($entryXml);
-        $newUserProfileEntryXml = $newUserProfileEntry->saveXML();
-        $this->assertTrue($entryXml == $newUserProfileEntryXml);
-    }
-
-    public function testEmptyUserProfileEntryToAndFromStringShouldMatchV2() {
-        $this->entry->setMajorProtocolVersion(2);
-        $entryXml = $this->entry->saveXML();
-        $newUserProfileEntry = new Zend_Gdata_YouTube_UserProfileEntry();
-        $newUserProfileEntry->setMajorProtocolVersion(2);
-        $newUserProfileEntry->transferFromXML($entryXml);
-        $newUserProfileEntryXml = $newUserProfileEntry->saveXML();
-        $this->assertTrue($entryXml == $newUserProfileEntryXml);
-    }
-
-    public function testGetFeedLinkReturnsAllStoredEntriesWhenUsedWithNoParameters() {
-        // Prepare test data
-        $entry1 = new Zend_Gdata_Extension_FeedLink();
-        $entry1->rel = "first";
-        $entry1->href= "foo";
-        $entry2 = new Zend_Gdata_Extension_FeedLink();
-        $entry2->rel = "second";
-        $entry2->href= "bar";
-        $data = array($entry1, $entry2);
-
-        // Load test data and run test
-        $this->entry->feedLink = $data;
-        $this->assertEquals(2, count($this->entry->feedLink));
-    }
-
-    public function testGetFeedLinkCanReturnEntriesByRelValue() {
-        // Prepare test data
-        $entry1 = new Zend_Gdata_Extension_FeedLink();
-        $entry1->rel = "first";
-        $entry1->href= "foo";
-        $entry2 = new Zend_Gdata_Extension_FeedLink();
-        $entry2->rel = "second";
-        $entry2->href= "bar";
-        $data = array($entry1, $entry2);
-
-        // Load test data and run test
-        $this->entry->feedLink = $data;
-        $this->assertEquals($entry1, $this->entry->getFeedLink('first'));
-        $this->assertEquals($entry2, $this->entry->getFeedLink('second'));
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testSamplePropertiesAreCorrectV2 () {
-        $this->entry->transferFromXML($this->V2entryText);
-        $this->entry->setMajorProtocolVersion(2);
-        $this->verifyAllSamplePropertiesAreCorrectV2($this->entry);
-    }
-
-    public function testConvertUserProfileEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newUserProfileEntry = new Zend_Gdata_YouTube_UserProfileEntry();
-        $newUserProfileEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newUserProfileEntry);
-        $newUserProfileEntryXml = $newUserProfileEntry->saveXML();
-        $this->assertEquals($entryXml, $newUserProfileEntryXml);
-    }
-
-    public function testConvertUserProfileEntryToAndFromStringV2() {
-        $this->entry->transferFromXML($this->V2entryText);
-        $entryXml = $this->entry->saveXML();
-        $newUserProfileEntry = new Zend_Gdata_YouTube_UserProfileEntry();
-        $newUserProfileEntry->setMajorProtocolVersion(2);
-        $newUserProfileEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrectV2($newUserProfileEntry);
-        $newUserProfileEntryXml = $newUserProfileEntry->saveXML();
-        $this->assertEquals($entryXml, $newUserProfileEntryXml);
-    }
-
-    public function testYTStatisticsInUserProfileEntryV2() {
-        $this->entry->transferFromXML($this->V2entryText);
-        $this->entry->setMajorProtocolVersion(2);
-        $statistics = $this->entry->getStatistics();
-        $this->assertEquals(14, $statistics->getVideoWatchCount());
-        $this->assertEquals(88, $statistics->getViewCount());
-        $this->assertEquals(12, $statistics->getSubscriberCount());
-        $this->assertEquals('2008-12-15T14:56:57.000-08:00',
-            $statistics->getLastWebAccess());
-
-        // test __toString()
-        $this->assertEquals('View Count=88 VideoWatchCount=14 ' .
-            'SubscriberCount=12 LastWebAccess=2008-12-15T14:56:57.000-08:00 ' .
-            'FavoriteCount=',
-            sprintf("%s", $statistics));
-
-    }
-
-}

+ 0 - 767
tests/Zend/Gdata/YouTube/VideoEntryTest.php

@@ -1,767 +0,0 @@
-<?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_YouTube
- * @subpackage   UnitTests
- * @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$
- */
-
-require_once 'Zend/Gdata/YouTube/VideoEntry.php';
-require_once 'Zend/Gdata/YouTube/Extension/State.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_VideoEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->entryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/VideoEntryDataSample1.xml',
-                true);
-        $this->privateEntryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/VideoEntryDataSamplePrivate.xml',
-                true);
-        $this->v2EntryText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/VideoEntryDataSampleV2.xml',
-                true);
-        $this->entry = new Zend_Gdata_YouTube_VideoEntry();
-    }
-
-    private function createRandomString() {
-        $randomString = '';
-        for ($x = 0; $x < 10; $x++) {
-            $randomCharacter = chr(rand(97,122));
-            $randomString .= $randomCharacter;
-        }
-        return $randomString;
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($videoEntry) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E',
-            $videoEntry->id->text);
-        $this->assertEquals('UMFI1hdm96E', $videoEntry->getVideoId());
-        $this->assertEquals('2007-01-07T01:50:15.000Z', $videoEntry->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $videoEntry->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', $videoEntry->category[0]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[1]->scheme);
-        $this->assertEquals('barkley', $videoEntry->category[1]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[2]->scheme);
-        $this->assertEquals('singing', $videoEntry->category[2]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[3]->scheme);
-        $this->assertEquals('acoustic', $videoEntry->category[3]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[4]->scheme);
-        $this->assertEquals('cover', $videoEntry->category[4]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $videoEntry->category[5]->scheme);
-        $this->assertEquals('Music', $videoEntry->category[5]->term);
-        $this->assertEquals('Music', $videoEntry->category[5]->label);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[6]->scheme);
-        $this->assertEquals('gnarls', $videoEntry->category[6]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[7]->scheme);
-        $this->assertEquals('music', $videoEntry->category[7]->term);
-
-        $this->assertEquals('text', $videoEntry->title->type);
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $videoEntry->title->text);;
-        $this->assertEquals('html', $videoEntry->content->type);
-        $this->assertEquals('self', $videoEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E', $videoEntry->getLink('self')->href);
-        $this->assertEquals('text/html', $videoEntry->getLink('alternate')->type);
-        $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $videoEntry->getLink('alternate')->href);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/responses', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->href);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/related', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->href);
-        $this->assertEquals('davidchoimusic', $videoEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $videoEntry->author[0]->uri->text);
-        $mediaGroup = $videoEntry->mediaGroup;
-
-        $this->assertEquals('plain', $mediaGroup->title->type);
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $mediaGroup->title->text);
-        $this->assertEquals('plain', $mediaGroup->description->type);
-        $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $mediaGroup->description->text);
-        $this->assertEquals('music, singing, gnarls, barkley, acoustic, cover', $mediaGroup->keywords->text);
-        $this->assertEquals(255, $mediaGroup->duration->seconds);
-        $this->assertEquals('Music', $mediaGroup->category[0]->label);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $mediaGroup->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/developertags.cat', $mediaGroup->category[1]->scheme);
-        $this->assertEquals('DeveloperTag1', $mediaGroup->category[1]->text);
-        $this->assertEquals('video', $mediaGroup->content[0]->medium);
-        $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E', $mediaGroup->content[0]->url);
-        $this->assertEquals('application/x-shockwave-flash', $mediaGroup->content[0]->type);
-        $this->assertEquals('true', $mediaGroup->content[0]->isDefault);
-        $this->assertEquals('full', $mediaGroup->content[0]->expression);
-        $this->assertEquals(255, $mediaGroup->content[0]->duration);
-        $this->assertEquals(5, $mediaGroup->content[0]->format);
-        $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $mediaGroup->player[0]->url);
-
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/2.jpg', $mediaGroup->thumbnail[0]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[0]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[0]->width);
-        $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[0]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/1.jpg', $mediaGroup->thumbnail[1]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[1]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[1]->width);
-        $this->assertEquals('00:01:03.750', $mediaGroup->thumbnail[1]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/3.jpg', $mediaGroup->thumbnail[2]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[2]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[2]->width);
-        $this->assertEquals('00:03:11.250', $mediaGroup->thumbnail[2]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/0.jpg', $mediaGroup->thumbnail[3]->url);
-        $this->assertEquals(240, $mediaGroup->thumbnail[3]->height);
-        $this->assertEquals(320, $mediaGroup->thumbnail[3]->width);
-        $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[3]->time);
-        $this->assertNull($mediaGroup->private);
-
-        $this->assertEquals(113321, $videoEntry->statistics->viewCount);
-        $this->assertEquals(1, $videoEntry->rating->min);
-        $this->assertEquals(5, $videoEntry->rating->max);
-        $this->assertEquals(1005, $videoEntry->rating->numRaters);
-        $this->assertEquals(4.77, $videoEntry->rating->average);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/comments', $videoEntry->comments->feedLink->href);
-
-        $this->assertEquals('37.398529052734375 -122.0635986328125', $videoEntry->where->point->pos->text);
-        $this->assertEquals('2008-09-25', $videoEntry->getVideoRecorded());
-    }
-
-    private function verifyAllPrivateSamplePropertiesAreCorrect ($videoEntry) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E',
-            $videoEntry->id->text);
-        $this->assertEquals('UMFI1hdm96E', $videoEntry->getVideoId());
-        $this->assertEquals('2007-01-07T01:50:15.000Z', $videoEntry->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $videoEntry->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', $videoEntry->category[0]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[1]->scheme);
-        $this->assertEquals('barkley', $videoEntry->category[1]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[2]->scheme);
-        $this->assertEquals('singing', $videoEntry->category[2]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[3]->scheme);
-        $this->assertEquals('acoustic', $videoEntry->category[3]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[4]->scheme);
-        $this->assertEquals('cover', $videoEntry->category[4]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $videoEntry->category[5]->scheme);
-        $this->assertEquals('Music', $videoEntry->category[5]->term);
-        $this->assertEquals('Music', $videoEntry->category[5]->label);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[6]->scheme);
-        $this->assertEquals('gnarls', $videoEntry->category[6]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[7]->scheme);
-        $this->assertEquals('music', $videoEntry->category[7]->term);
-
-        $this->assertEquals('text', $videoEntry->title->type);
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $videoEntry->title->text);;
-        $this->assertEquals('html', $videoEntry->content->type);
-        $this->assertEquals('self', $videoEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E', $videoEntry->getLink('self')->href);
-        $this->assertEquals('text/html', $videoEntry->getLink('alternate')->type);
-        $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $videoEntry->getLink('alternate')->href);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/responses', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->href);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/related', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->href);
-        $this->assertEquals('davidchoimusic', $videoEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $videoEntry->author[0]->uri->text);
-        $mediaGroup = $videoEntry->mediaGroup;
-
-        $this->assertEquals('plain', $mediaGroup->title->type);
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $mediaGroup->title->text);
-        $this->assertEquals('plain', $mediaGroup->description->type);
-        $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $mediaGroup->description->text);
-        $this->assertEquals('music, singing, gnarls, barkley, acoustic, cover', $mediaGroup->keywords->text);
-        $this->assertEquals(255, $mediaGroup->duration->seconds);
-
-        $this->assertEquals('Music', $mediaGroup->category[0]->label);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $mediaGroup->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/developertags.cat', $mediaGroup->category[1]->scheme);
-        $this->assertEquals('DeveloperTag1', $mediaGroup->category[1]->text);
-        $this->assertEquals('video', $mediaGroup->content[0]->medium);
-        $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E', $mediaGroup->content[0]->url);
-        $this->assertEquals('application/x-shockwave-flash', $mediaGroup->content[0]->type);
-        $this->assertEquals('true', $mediaGroup->content[0]->isDefault);
-        $this->assertEquals('full', $mediaGroup->content[0]->expression);
-        $this->assertEquals(255, $mediaGroup->content[0]->duration);
-        $this->assertEquals(5, $mediaGroup->content[0]->format);
-        $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $mediaGroup->player[0]->url);
-
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/2.jpg', $mediaGroup->thumbnail[0]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[0]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[0]->width);
-        $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[0]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/1.jpg', $mediaGroup->thumbnail[1]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[1]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[1]->width);
-        $this->assertEquals('00:01:03.750', $mediaGroup->thumbnail[1]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/3.jpg', $mediaGroup->thumbnail[2]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[2]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[2]->width);
-        $this->assertEquals('00:03:11.250', $mediaGroup->thumbnail[2]->time);
-        $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/0.jpg', $mediaGroup->thumbnail[3]->url);
-        $this->assertEquals(240, $mediaGroup->thumbnail[3]->height);
-        $this->assertEquals(320, $mediaGroup->thumbnail[3]->width);
-        $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[3]->time);
-        $this->assertTrue($mediaGroup->private instanceof Zend_Gdata_YouTube_Extension_Private);
-
-        $this->assertEquals(113321, $videoEntry->statistics->viewCount);
-        $this->assertEquals(1, $videoEntry->rating->min);
-        $this->assertEquals(5, $videoEntry->rating->max);
-        $this->assertEquals(1005, $videoEntry->rating->numRaters);
-        $this->assertEquals(4.77, $videoEntry->rating->average);
-        $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/comments', $videoEntry->comments->feedLink->href);
-
-        $this->assertEquals('37.398529052734375 -122.0635986328125', $videoEntry->where->point->pos->text);
-        $this->assertEquals('2008-09-25', $videoEntry->getVideoRecorded());
-    }
-
-    public function verifyAllV2SamplePropertiesAreCorrect($videoEntry) {
-         $this->assertEquals('tag:youtube.com,2008:video:UMFI1hdm96E',
-            $videoEntry->id->text);
-        $this->assertEquals('UMFI1hdm96E', $videoEntry->getVideoId());
-        $this->assertEquals('2008-12-08T04:04:33.000Z', $videoEntry->updated->text);
-
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[0]->scheme);
-        $this->assertEquals('cover', $videoEntry->category[0]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[1]->scheme);
-        $this->assertEquals('acoustic', $videoEntry->category[1]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[2]->scheme);
-        $this->assertEquals('gnarls', $videoEntry->category[2]->term);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $videoEntry->category[3]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', $videoEntry->category[3]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[4]->scheme);
-        $this->assertEquals('barkley', $videoEntry->category[4]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[5]->scheme);
-        $this->assertEquals('music', $videoEntry->category[5]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[6]->scheme);
-        $this->assertEquals('singing', $videoEntry->category[6]->term);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $videoEntry->category[7]->scheme);
-        $this->assertEquals('Music', $videoEntry->category[7]->term);
-
-        $this->assertEquals('text', $videoEntry->title->type);
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $videoEntry->title->text);;
-        $this->assertEquals('application/x-shockwave-flash', $videoEntry->content->type);
-        $this->assertEquals('self', $videoEntry->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/videos/UMFI1hdm96E?v=2', $videoEntry->getLink('self')->href);
-        $this->assertEquals('text/html', $videoEntry->getLink('alternate')->type);
-        $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $videoEntry->getLink('alternate')->href);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/videos/UMFI1hdm96E/responses?v=2', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->href);
-        $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/videos/UMFI1hdm96E/related?v=2', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->href);
-        $this->assertEquals('davidchoimusic', $videoEntry->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/users/davidchoimusic', $videoEntry->author[0]->uri->text);
-
-        $mediaGroup = $videoEntry->mediaGroup;
-
-        $this->assertEquals('UMFI1hdm96E', $mediaGroup->getVideoId()->text);
-        $this->assertEquals('plain', $mediaGroup->title->type);
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $mediaGroup->title->text);
-        $this->assertEquals('plain', $mediaGroup->description->type);
-        $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $mediaGroup->description->text);
-        $this->assertEquals('acoustic, barkley, cover, gnarls, music, singing', $mediaGroup->keywords->text);
-        $this->assertEquals(255, $mediaGroup->duration->seconds);
-
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/developertags.cat', $mediaGroup->category[0]->scheme);
-        $this->assertEquals('DeveloperTag1', $mediaGroup->category[0]->text);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $mediaGroup->category[1]->scheme);
-        $this->assertEquals('Music', $mediaGroup->category[1]->text);
-        $this->assertEquals('video', $mediaGroup->content[0]->medium);
-        $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E&f=gdata_videos', $mediaGroup->content[0]->url);
-        $this->assertEquals('application/x-shockwave-flash', $mediaGroup->content[0]->type);
-        $this->assertEquals('true', $mediaGroup->content[0]->isDefault);
-        $this->assertEquals('full', $mediaGroup->content[0]->expression);
-        $this->assertEquals(255, $mediaGroup->content[0]->duration);
-        $this->assertEquals(5, $mediaGroup->content[0]->format);
-        $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $mediaGroup->player[0]->url);
-
-        $this->assertEquals('HK,TW', $mediaGroup->getMediaRating()->getCountry());
-        $this->assertEquals(1, $mediaGroup->getMediaRating()->text);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#mediarating',
-            $mediaGroup->getMediaRating()->getScheme());
-
-        $this->assertEquals('http://i.ytimg.com/vi/UMFI1hdm96E/2.jpg', $mediaGroup->thumbnail[0]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[0]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[0]->width);
-        $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[0]->time);
-        $this->assertEquals('http://i.ytimg.com/vi/UMFI1hdm96E/1.jpg', $mediaGroup->thumbnail[1]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[1]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[1]->width);
-        $this->assertEquals('00:01:03.750', $mediaGroup->thumbnail[1]->time);
-        $this->assertEquals('http://i.ytimg.com/vi/UMFI1hdm96E/3.jpg', $mediaGroup->thumbnail[2]->url);
-        $this->assertEquals(97, $mediaGroup->thumbnail[2]->height);
-        $this->assertEquals(130, $mediaGroup->thumbnail[2]->width);
-        $this->assertEquals('00:03:11.250', $mediaGroup->thumbnail[2]->time);
-        $this->assertEquals('http://i.ytimg.com/vi/UMFI1hdm96E/0.jpg', $mediaGroup->thumbnail[3]->url);
-        $this->assertEquals(240, $mediaGroup->thumbnail[3]->height);
-        $this->assertEquals(320, $mediaGroup->thumbnail[3]->width);
-        $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[3]->time);
-
-        $this->assertEquals(267971, $videoEntry->statistics->viewCount);
-        $this->assertEquals(1, $videoEntry->rating->min);
-        $this->assertEquals(5, $videoEntry->rating->max);
-        $this->assertEquals(2062, $videoEntry->rating->numRaters);
-        $this->assertEquals(4.74, $videoEntry->rating->average);
-        $this->assertEquals('http://gdata.youtube.com/feeds/api/videos/UMFI1hdm96E/comments?v=2', $videoEntry->comments->feedLink->href);
-
-        $this->assertEquals('37.398529052734375 -122.0635986328125', $videoEntry->where->point->pos->text);
-        $this->assertEquals('2008-09-25', $videoEntry->getVideoRecorded());
-
-
-
-    }
-
-    public function testGetVideoId() {
-        $videoEntry = new Zend_Gdata_YouTube_VideoEntry();
-
-        // assert valid ID
-        $videoEntry->id = new Zend_Gdata_App_Extension_Id('http://gdata.youtube.com/feeds/videos/ABCDEFG12AB');
-        $this->assertEquals('ABCDEFG12AB', $videoEntry->getVideoId());
-    }
-
-    public function testGetVideoIdV2() {
-        $v2VideoEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $v2VideoEntry->setMajorProtocolVersion(2);
-
-        $v2MediaGroup = new Zend_Gdata_YouTube_Extension_MediaGroup();
-        $v2MediaGroup->setVideoId(
-            new Zend_Gdata_YouTube_Extension_VideoId('UMFI1hdm96E'));
-
-        $v2VideoEntry->setMediaGroup($v2MediaGroup);
-
-        $this->assertEquals('UMFI1hdm96E', $v2VideoEntry->getVideoId());
-    }
-
-    public function testGetVideoIdException() {
-
-        $exceptionCaught = false;
-        $videoEntry = new Zend_Gdata_YouTube_VideoEntry();
-
-        // use invalid ID
-        $videoEntry->id = new Zend_Gdata_App_Extension_Id('adfadfasf');
-
-        try {
-            $videoEntry->getVideoId();
-
-        } catch (Zend_Gdata_App_Exception $e) {
-            $exceptionCaught = true;
-        }
-
-        $this->assertTrue($exceptionCaught, 'Expected exception not caught: ' .
-            'Zend_Gdata_AppException');
-    }
-
-    public function testGetVersionExceptionOnGetRacy() {
-        $videoEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $videoEntry->setMajorProtocolVersion(2);
-
-        $exceptionCaught = false;
-
-        try {
-            $videoEntry->getRacy();
-        } catch (Zend_Gdata_App_VersionException $e) {
-            $exceptionCaught = true;
-        }
-
-        $this->assertTrue($exceptionCaught, 'Expected exception not caught: ' .
-            'Zend_Gdata_App_VersionException');
-    }
-
-    public function testGetVersionExceptionOnSetRacy() {
-        $videoEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $videoEntry->setMajorProtocolVersion(2);
-
-        $exceptionCaught = false;
-
-        try {
-            $videoEntry->getRacy();
-        } catch (Zend_Gdata_App_VersionException $e) {
-            $exceptionCaught = true;
-        }
-
-        $this->assertTrue($exceptionCaught, 'Expected exception not caught: ' .
-            'Zend_Gdata_App_VersionException');
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElementsV2() {
-        $this->entry->transferFromXML($this->v2EntryText);
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributesV2() {
-        $this->entry->transferFromXML($this->v2EntryText);
-        $this->assertTrue(is_array($this->entry->extensionAttributes));
-        $this->assertTrue(count($this->entry->extensionAttributes) == 0);
-    }
-
-    public function testEmptyVideoEntryToAndFromStringShouldMatch() {
-        $entryXml = $this->entry->saveXML();
-        $newVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $newVideoEntry->transferFromXML($entryXml);
-        $newVideoEntryXml = $newVideoEntry->saveXML();
-        $this->assertTrue($entryXml == $newVideoEntryXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->entryText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testPrivateSamplePropertiesAreCorrect () {
-        $this->entry->transferFromXML($this->privateEntryText);
-        $this->verifyAllPrivateSamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testV2SamplePropertiesAreCorrect() {
-        $this->entry->transferFromXML($this->v2EntryText);
-        $this->entry->setMajorProtocolVersion(2);
-        $this->verifyAllV2SamplePropertiesAreCorrect($this->entry);
-    }
-
-    public function testGetVideoTitle() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $videoEntry->getVideoTitle());
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getVideoTitle());
-    }
-
-    public function testSetVideoTitle() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $newTitle = 'My New Title';
-        $videoEntry->setVideoTitle($newTitle);
-        $this->assertEquals($videoEntry->getVideoTitle(), $newTitle);
-    }
-
-    public function testGetVideoDescription() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $videoEntry->getVideoDescription());
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getVideoDescription());
-    }
-
-    public function testSetVideoDescription() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $newDescription = 'My New Description';
-        $videoEntry->setVideoDescription($newDescription);
-        $this->assertEquals($videoEntry->getVideoDescription(), $newDescription);
-    }
-
-    public function testGetVideoWatchPageUrl() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $videoEntry->getVideoWatchPageUrl());
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getVideoWatchPageUrl());
-    }
-
-    public function testGetVideoThumbnails() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-
-        $mediaThumbnails1 = $videoEntry->getMediaGroup()->getThumbnail();
-        $mediaThumbnails2 = $videoEntry->getVideoThumbnails();
-
-        $this->assertEquals(count($mediaThumbnails1), count($mediaThumbnails2));
-
-        $foundThumbnail = false;
-        foreach ($mediaThumbnails2 as $thumbnail) {
-            if ($thumbnail['url'] == 'http://img.youtube.com/vi/UMFI1hdm96E/1.jpg') {
-                $foundThumbnail = true;
-                $this->assertEquals(97, $thumbnail['height']);
-                $this->assertEquals(130, $thumbnail['width']);
-                $this->assertEquals('00:01:03.750', $thumbnail['time']);
-            }
-        }
-        $this->assertTrue($foundThumbnail);
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(array(), $newEntry->getVideoThumbnails());
-    }
-
-    public function testGetVideoTags() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-
-        $keywords = $videoEntry->getMediaGroup()->getKeywords();
-
-        $keywordsString = (string) $keywords;
-
-        if (strlen(trim($keywordsString)) > 0) {
-            $keywordArray = preg_split('/(, *)|,/', $keywordsString);
-        }
-
-        $tagArray = $videoEntry->getVideoTags();
-        $this->assertEquals(count($keywordArray), count($tagArray));
-        foreach ($keywordArray as $keyword) {
-            $this->assertTrue(in_array($keyword, $tagArray));
-        }
-        foreach ($tagArray as $tag) {
-            $this->assertTrue(in_array($tag, $keywordArray));
-        }
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(array(), $newEntry->getVideoTags());
-    }
-
-    public function testSetVideoTags() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-
-        $newKeywordsString  = $this->createRandomString()
-            . ', ' . $this->createRandomString();
-        $videoEntry->setVideoTags($newKeywordsString);
-
-        if (strlen(trim($newKeywordsString)) > 0) {
-            $keywordArray = preg_split('/(, *)|,/', $newKeywordsString);
-        }
-
-        $tagArray = $videoEntry->getVideoTags();
-        $this->assertEquals(count($keywordArray), count($tagArray));
-
-        foreach ($keywordArray as $keyword) {
-            $this->assertTrue(in_array($keyword, $tagArray));
-        }
-
-        foreach ($tagArray as $tag) {
-            $this->assertTrue(in_array($tag, $keywordArray));
-        }
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(array(), $newEntry->getVideoTags());
-    }
-
-    public function testGetVideoDeveloperTags() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-
-        $categories = $videoEntry->getMediaGroup()->getCategory();
-        $developerTagsArrayFromMediaGroup = null;
-        foreach($categories as $category) {
-            if ($category->getScheme() == 'http://gdata.youtube.com/schemas/2007/developertags.cat') {
-                $developerTagsArrayFromMediaGroup[] = $category->getText();
-            }
-        }
-
-        $developerTagsArray = $videoEntry->getVideoDeveloperTags();
-
-        $this->assertEquals(count($developerTagsArrayFromMediaGroup), count($developerTagsArray));
-        foreach ($developerTagsArrayFromMediaGroup as $devTagMG) {
-            $this->assertTrue(in_array($devTagMG, $developerTagsArrayFromMediaGroup));
-        }
-        foreach ($developerTagsArray as $devTag) {
-            $this->assertTrue(in_array($devTag, $developerTagsArray));
-        }
-      }
-
-    public function testSetVideoDeveloperTags() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $existingDevTags = $videoEntry->getVideoDeveloperTags();
-
-        $newDeveloperTags = array(
-            $this->createRandomString(),
-            $this->createRandomString());
-
-        $videoEntry->setVideoDeveloperTags($newDeveloperTags);
-        $newAndOldDeveloperTags = array_merge($newDeveloperTags, $existingDevTags);
-        $developerTagsArray = $videoEntry->getVideoDeveloperTags();
-        $this->assertEquals(count($newAndOldDeveloperTags), count($developerTagsArray));
-
-        foreach($developerTagsArray as $developerTagOnEntry) {
-            $this->assertTrue(in_array($developerTagOnEntry, $newAndOldDeveloperTags));
-        }
-    }
-
-    public function testGetFlashPlayerUrl() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E', $videoEntry->getFlashPlayerUrl());
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getFlashPlayerUrl());
-    }
-
-    public function testGetVideoDuration() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $this->assertEquals(255, $videoEntry->getVideoDuration());
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getVideoDuration());
-    }
-
-    public function testGetVideoViewCount() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $this->assertEquals(113321, $videoEntry->getVideoViewCount());
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getVideoViewCount());
-    }
-
-    public function testGetVideoGeoLocation() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $geoLocation =  $videoEntry->getVideoGeoLocation();
-        $this->assertEquals('37.398529052734375', $geoLocation['latitude']);
-        $this->assertEquals('-122.0635986328125', $geoLocation['longitude']);
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getVideoGeoLocation());
-    }
-
-    public function testGetVideoRatingInfo() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-
-        $ratingInfo = $videoEntry->getVideoRatingInfo();
-
-        $this->assertEquals(4.77, $ratingInfo['average']);
-        $this->assertEquals(1005, $ratingInfo['numRaters']);
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getVideoRatingInfo());
-    }
-
-    public function testGetVideoCategory() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $this->assertEquals('Music', $videoEntry->getVideoCategory());
-
-        $newEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $this->assertEquals(null, $newEntry->getVideoCategory());
-    }
-
-    public function testSetVideoCategory() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $newCategory = 'Comedy';
-        $videoEntry->setVideoCategory($newCategory);
-        $this->assertEquals($videoEntry->getVideoCategory(), $newCategory);
-    }
-
-    public function testConvertVideoEntryToAndFromString() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newVideoEntry = new Zend_Gdata_YouTube_VideoEntry();
-        $newVideoEntry->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newVideoEntry);
-        $newVideoEntryXml = $newVideoEntry->saveXML();
-        $this->assertEquals($entryXml, $newVideoEntryXml);
-    }
-
-    public function testNoEmbed() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-        $this->assertNotEquals(null, $videoEntry->getNoEmbed());
-    }
-
-    public function testVideoState() {
-        $this->entry->transferFromXML($this->entryText);
-        $videoEntry = $this->entry;
-
-        $videoState = $videoEntry->getVideoState();
-        $this->assertTrue($videoState instanceof Zend_Gdata_YouTube_Extension_State);
-
-        $this->assertEquals('rejected', $videoState->getName());
-        $this->assertEquals('inappropriate', $videoState->getReasonCode());
-        $this->assertEquals('http://www.youtube.com/t/community_guidelines', $videoState->getHelpUrl());
-        $this->assertEquals('The content of this video may violate the terms of use.',
-                            $videoState->getText());
-    }
-
-    public function testVideoPrivate() {
-        $this->entry->transferFromXml($this->privateEntryText);
-        $videoEntry = $this->entry;
-
-        $this->assertTrue($videoEntry->isVideoPrivate());
-    }
-
-    public function testSetVideoPrivate() {
-        $this->entry->transferFromXml($this->entryText);
-        $videoEntry = $this->entry;
-        $videoEntry->setVideoPrivate();
-
-        $this->assertTrue($videoEntry->isVideoPrivate());
-    }
-
-    public function testSetVideoPublic() {
-        $this->entry->transferFromXml($this->privateEntryText);
-        $videoEntry = $this->entry;
-        $videoEntry->setVideoPublic();
-
-        $this->assertFalse($videoEntry->isVideoPrivate());
-    }
-
-    public function testRetrieveCommentsFeedUrl() {
-        $this->entry->transferFromXML($this->entryText);
-        $commentsFeedUrl = $this->entry->getVideoCommentFeedUrl();
-        $this->assertEquals($commentsFeedUrl,
-            'http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/comments');
-    }
-
-    public function testAddVideoEntryRating()
-    {
-        $this->entry->transferFromXML($this->entryText);
-        $ratingValue = 2;
-        $entryWithRating = $this->entry->setVideoRating($ratingValue);
-        $this->assertTrue(
-            $entryWithRating instanceof Zend_Gdata_YouTube_VideoEntry);
-
-        $rating = $entryWithRating->getRating();
-        $this->assertTrue(
-            $rating instanceof Zend_Gdata_Extension_Rating);
-
-        $this->assertEquals($rating->getValue(), $ratingValue);
-    }
-
-}

+ 0 - 109
tests/Zend/Gdata/YouTube/VideoFeedTest.php

@@ -1,109 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/VideoFeed.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_VideoFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp() {
-        $this->feedText = file_get_contents(
-                'Zend/Gdata/YouTube/_files/VideoFeedDataSample1.xml',
-                true);
-        $this->feed = new Zend_Gdata_YouTube_VideoFeed();
-    }
-
-    private function verifyAllSamplePropertiesAreCorrect ($videoFeed) {
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/uploads',
-            $videoFeed->id->text);
-        $this->assertEquals('2007-09-21T02:27:22.638Z', $videoFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $videoFeed->category[0]->scheme);
-        $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', $videoFeed->category[0]->term);
-        $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $videoFeed->logo->text);
-        $this->assertEquals('text', $videoFeed->title->type);
-        $this->assertEquals('Davidchoimusic\'s Videos', $videoFeed->title->text);;
-        $this->assertEquals('self', $videoFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $videoFeed->getLink('self')->type);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/uploads?start-index=1&max-results=5', $videoFeed->getLink('self')->href);
-        $this->assertEquals('davidchoimusic', $videoFeed->author[0]->name->text);
-        $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $videoFeed->author[0]->uri->text);
-        $this->assertEquals(54, $videoFeed->totalResults->text);
-        $this->assertEquals(1, $videoFeed->startIndex->text);
-        $this->assertEquals(5, $videoFeed->itemsPerPage->text);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionElements() {
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertTrue(count($this->feed->extensionElements) == 0);
-    }
-
-    public function testEmptyEntryShouldHaveNoExtensionAttributes() {
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertTrue(count($this->feed->extensionAttributes) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionElements() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionElements));
-        $this->assertTrue(count($this->feed->extensionElements) == 0);
-    }
-
-    public function testSampleEntryShouldHaveNoExtensionAttributes() {
-        $this->feed->transferFromXML($this->feedText);
-        $this->assertTrue(is_array($this->feed->extensionAttributes));
-        $this->assertTrue(count($this->feed->extensionAttributes) == 0);
-    }
-
-    public function testEmptyVideoFeedToAndFromStringShouldMatch() {
-        $entryXml = $this->feed->saveXML();
-        $newVideoFeed = new Zend_Gdata_YouTube_VideoFeed();
-        $newVideoFeed->transferFromXML($entryXml);
-        $newVideoFeedXml = $newVideoFeed->saveXML();
-        $this->assertTrue($entryXml == $newVideoFeedXml);
-    }
-
-    public function testSamplePropertiesAreCorrect () {
-        $this->feed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->feed);
-    }
-
-    public function testConvertVideoFeedToAndFromString() {
-        $this->feed->transferFromXML($this->feedText);
-        $entryXml = $this->feed->saveXML();
-        $newVideoFeed = new Zend_Gdata_YouTube_VideoFeed();
-        $newVideoFeed->transferFromXML($entryXml);
-        $this->verifyAllSamplePropertiesAreCorrect($newVideoFeed);
-        $newVideoFeedXml = $newVideoFeed->saveXML();
-        $this->assertEquals($entryXml, $newVideoFeedXml);
-    }
-
-}

+ 0 - 277
tests/Zend/Gdata/YouTube/VideoQueryTest.php

@@ -1,277 +0,0 @@
-<?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_YouTube
- * @subpackage UnitTests
- * @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 $
- */
-
-require_once 'Zend/Gdata/YouTube/VideoQuery.php';
-require_once 'Zend/Gdata/YouTube.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_YouTube
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_YouTube
- */
-class Zend_Gdata_YouTube_VideoQueryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function testQueryStringConstruction()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $query->setOrderBy('viewCount');
-        $query->setVideoQuery('foobar');
-        $expectedString = '?orderby=viewCount&vq=foobar';
-        $this->assertEquals($expectedString, $query->getQueryString());
-    }
-
-    public function testQueryStringConstructionV2()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $query->setOrderBy('viewCount');
-        $query->setVideoQuery('version2');
-        $expectedString = '?orderby=viewCount&q=version2';
-        $this->assertEquals($expectedString, $query->getQueryString(2));
-    }
-
-    public function testSafeSearchQueryV2()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $exceptionCaught = false;
-        $query->setRacy('include');
-        try {
-            $query->getQueryString(2);
-        } catch (Zend_Gdata_App_VersionException $e) {
-          $exceptionCaught = true;
-        }
-        $this->assertTrue($exceptionCaught, 'Zend_Gdata_App_VersionException' .
-            ' expected but not found');
-    }
-
-    public function testLocationRadiusV1()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $exceptionCaught = false;
-        $query->setLocationRadius('1km');
-        try {
-            $query->getQueryString(1);
-        } catch (Zend_Gdata_App_VersionException $e) {
-          $exceptionCaught = true;
-        }
-        $this->assertTrue($exceptionCaught, 'Zend_Gdata_App_VersionException' .
-            ' expected but not found');
-    }
-
-    public function testLocationV2()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $query->setLocation('-37.122,122.01');
-        $expectedString = '?location=-37.122%2C122.01';
-        $this->assertEquals($expectedString, $query->getQueryString(2));
-    }
-
-    public function testLocationExceptionOnNonNumericV2()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $exceptionCaught = false;
-
-        try {
-            $query->setLocation('mars');
-        } catch (Zend_Gdata_App_InvalidArgumentException $e) {
-            $exceptionCaught = true;
-        }
-
-        $this->assertTrue($exceptionCaught, 'Expected Zend_Gdata_App_' .
-            'IllegalArgumentException when using alpha in setLocation');
-    }
-
-    public function testLocationExceptionOnOnlyOneCoordinateV2()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $exceptionCaught = false;
-
-        try {
-            $query->setLocation('-25.001');
-        } catch (Zend_Gdata_App_InvalidArgumentException $e) {
-            $exceptionCaught = true;
-        }
-
-        $this->assertTrue($exceptionCaught, 'Expected Zend_Gdata_App_' .
-            'IllegalArgumentException when using only 1 coordinate ' .
-            'in setLocation');
-    }
-
-    public function testUploaderExceptionOnInvalidV2()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $exceptionCaught = false;
-
-        try {
-            $query->setUploader('invalid');
-        } catch (Zend_Gdata_App_InvalidArgumentException $e) {
-            $exceptionCaught = true;
-        }
-
-        $this->assertTrue($exceptionCaught, 'Expected Zend_Gdata_App_' .
-            'IllegalArgumentException when using invalid string in ' .
-            'setUploader.');
-    }
-
-    public function testProjectionPresentInV2Query()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $query->setVideoQuery('foo');
-        $expectedString = 'https://gdata.youtube.com/feeds/api/videos?q=foo';
-        $this->assertEquals($expectedString, $query->getQueryUrl(2));
-    }
-
-    public function testSafeSearchParametersInV2()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $exceptionCaught = false;
-        try {
-            $query->setSafeSearch('invalid');
-        } catch (Zend_Gdata_App_InvalidArgumentException $e) {
-            $exceptionCaught = true;
-        }
-        $this->assertTrue($exceptionCaught, 'Expected Zend_Gdata_App_' .
-            'InvalidArgumentException when using invalid value for ' .
-            'safeSearch.');
-    }
-
-    /**
-     * @group ZF-8720
-     * @expectedException Zend_Gdata_App_InvalidArgumentException
-     */
-    public function testVideoQuerySetLocationException()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $location = 'foobar';
-        $this->assertNull($query->setLocation($location));
-    }
-
-    /**
-     * @group ZF-8720
-     * @expectedException Zend_Gdata_App_InvalidArgumentException
-     */
-    public function testVideoQuerySetLocationExceptionV2()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $location = '-100x,-200y';
-        $this->assertNull($query->setLocation($location));
-    }
-
-    /**
-     * @group ZF-8720
-     * @expectedException Zend_Gdata_App_InvalidArgumentException
-     */
-    public function testVideoQuerySetLocationExceptionV3()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-        $location = '-100x,-200y!';
-        $this->assertNull($query->setLocation($location));
-    }
-
-    /**
-     * @group ZF-8720
-     */
-    public function testQueryExclamationMarkRemoveBug()
-    {
-        $yt = new Zend_Gdata_YouTube();
-        $query = $yt->newVideoQuery();
-
-        $location = '37.42307,-122.08427';
-        $this->assertNull($query->setLocation($location));
-        $this->assertEquals($location, $query->getLocation());
-
-        $location = '37.42307,-122.08427!';
-        $this->assertNull($query->setLocation($location));
-        $this->assertEquals($location, $query->getLocation());
-    }
-
-    /**
-     * @group ZF-12500
-     */
-    public function testQueryUrlForFeedTypRelated()
-    {
-        $yt = new Zend_Gdata_YouTube();
-
-        // Query
-        $query = $yt->newVideoQuery();
-        $query->setFeedType('related', 'foo');
-
-        // Test
-        $this->assertSame(
-            'https://gdata.youtube.com/feeds/api/videos/foo/related',
-            $query->getQueryUrl()
-        );
-    }
-
-    /**
-     * @group ZF-12500
-     */
-    public function testQueryUrlForFeedTypResponses()
-    {
-        $yt = new Zend_Gdata_YouTube();
-
-        // Query
-        $query = $yt->newVideoQuery();
-        $query->setFeedType('responses', 'foo');
-
-        // Test
-        $this->assertSame(
-            'https://gdata.youtube.com/feeds/api/videos/foo/responses',
-            $query->getQueryUrl()
-        );
-    }
-
-    /**
-     * @group ZF-12500
-     */
-    public function testQueryUrlForFeedTypComments()
-    {
-        $yt = new Zend_Gdata_YouTube();
-
-        // Query
-        $query = $yt->newVideoQuery();
-        $query->setFeedType('comments', 'foo');
-
-        // Test
-        $this->assertSame(
-            'https://gdata.youtube.com/feeds/api/videos/foo/comments',
-            $query->getQueryUrl()
-        );
-    }
-}

+ 0 - 23
tests/Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml

@@ -1,23 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<entry xmlns='http://www.w3.org/2005/Atom' xmlns:yt='http://gdata.youtube.com/schemas/2007' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/"D0EGSH47eCp7ImA9WxRQQEg."'>
-  <id>tag:youtube.com,2008:event:Z2RweXRob24xMTIzNDMwMDAyMzI5NTQ2Nzg2MA%3D%3D</id>
-  <updated>2009-01-16T09:13:49.000-08:00</updated>
-  <category scheme='http://gdata.youtube.com/schemas/2007/userevents.cat'
-    term='video_favorited'/>
-  <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#userEvent'/>
-  <title>tayzonzay has favorited a video</title>
-  <link rel='alternate' type='text/html' href='http://www.youtube.com'/>
-  <link rel='http://gdata.youtube.com/schemas/2007#video'
-    type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/api/videos/z3U0kuLH974?v=2'/>
-  <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/api/events/VGF5Wm9uZGF5MzEyaIl2MTMxOTcxMDk3NzQ5MzM%3D?v=2'/>
-  <author>
-    <name>tayzonzay</name>
-    <uri>http://gdata.youtube.com/feeds/api/users/tayzonzay</uri>
-  </author>
-  <yt:videoid>z3U0kuLH974</yt:videoid>
-  <yt:username>foo</yt:username>
-  <gd:rating min='1' max='5' value='2' />
-</entry>

+ 0 - 47
tests/Zend/Gdata/YouTube/_files/ActivityFeedDataSample1.xml

@@ -1,47 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<feed xmlns='http://www.w3.org/2005/Atom'
-  xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
-  xmlns:gml='http://www.opengis.net/gml'
-  xmlns:georss='http://www.georss.org/georss'
-  xmlns:media='http://search.yahoo.com/mrss/'
-  xmlns:batch='http://schemas.google.com/gdata/batch'
-  xmlns:yt='http://gdata.youtube.com/schemas/2007'
-  xmlns:gd='http://schemas.google.com/g/2005'
-  gd:etag='W/"D0EGSH47eCp7ImA9WxRVGEg.&quot;'>
-  <updated>2009-01-28T09:13:49.000-08:00</updated>
-<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/events?v=2'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/events/batch?v=2'/><link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/events?author=gdpython&amp;start-index=1&amp;max-results=25&amp;v=2'/><link rel='service' type='application/atomsvc+xml' href='http://gdata.youtube.com/feeds/api/events?alt=atom-service&amp;v=2'/>
-
-
-
-  <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#userEvent'/>
-  <title>Activity of tayzonzay</title>
-  <logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
-  <author>
-    <name>YouTube</name>
-    <uri>http://www.youtube.com/</uri>
-  </author>
-  <generator version='2.0' uri='http://gdata.youtube.com/'>YouTube data API</generator>
-  <openSearch:totalResults>12</openSearch:totalResults>
-  <openSearch:startIndex>1</openSearch:startIndex>
-  <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
-  <entry gd:etag='W/"D0EGSH47eCp7ImA9WxRQQEg."'>
-    <updated>2009-01-16T09:13:49.000-08:00</updated>
-    <category scheme='http://gdata.youtube.com/schemas/2007/userevents.cat'
-      term='video_favorited'/>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-      term='http://gdata.youtube.com/schemas/2007#userEvent'/>
-    <title>tayzonzay has favorited a video</title>
-    <link rel='alternate' type='text/html' href='http://www.youtube.com'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/z3U0kuLH974?v=2'/>
-    <link rel='self' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/events/VGF5Wm9uZGF5MzEyaIl2MTMxOTcxMDk3NzQ5MzM%3D?v=2'/>
-    <author>
-      <name>tayzonzay</name>
-      <uri>http://gdata.youtube.com/feeds/api/users/tayzonzay</uri>
-    </author>
-    <yt:videoid>z3U0kuLH974</yt:videoid>
-  </entry>
-</feed>

+ 0 - 20
tests/Zend/Gdata/YouTube/_files/CommentEntryDataSample1.xml

@@ -1,20 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<entry xmlns='http://www.w3.org/2005/Atom'>
-  <id>http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052</id>
-  <published>2007-09-02T18:00:04.000-07:00</published>
-  <updated>2007-09-02T18:00:04.000-07:00</updated>
-  <category scheme='http://schemas.google.com/g/2005#kind'
-  term='http://gdata.youtube.com/schemas/2007#comment' />
-  <title type='text'>how to turn ...</title>
-  <content type='text'>how to turn rejection and heartbreak into something positive is the big mystery of life but you're managed to turn it to your advantage with a beautiful song. Who was she?</content>
-  <link rel='related' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg' />
-  <link rel='alternate' type='text/html'
-  href='http://www.youtube.com/watch?v=Lnio-pqLPgg' />
-  <link rel='self' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052' />
-  <author>
-    <name>reneemathome</name>
-    <uri>http://gdata.youtube.com/feeds/users/reneemathome</uri>
-  </author>
-</entry>

+ 0 - 112
tests/Zend/Gdata/YouTube/_files/CommentFeedDataSample1.xml

@@ -1,112 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'>
-  <id>http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments</id>
-  <updated>2007-09-21T02:32:55.032Z</updated>
-  <category scheme='http://schemas.google.com/g/2005#kind'
-  term='http://gdata.youtube.com/schemas/2007#comment' />
-  <title type='text'>Comments on '"That Girl" - Original Song - Acoustic Version'</title>
-  <logo> http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
-  <link rel='related' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg' />
-  <link rel='alternate' type='text/html'
-  href='http://www.youtube.com/watch?v=Lnio-pqLPgg' />
-  <link rel='http://schemas.google.com/g/2005#feed'
-  type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments' />
-  <link rel='self' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments?start-index=1&amp;max-results=4' />
-  <link rel='next' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments?start-index=6&amp;max-results=4' />
-  <author>
-    <name>YouTube</name>
-    <uri>http://www.youtube.com/</uri>
-  </author>
-  <generator version='beta' uri='http://gdata.youtube.com/'>YouTube data API</generator>
-  <openSearch:totalResults>100</openSearch:totalResults>
-  <openSearch:startIndex>1</openSearch:startIndex>
-  <openSearch:itemsPerPage>4</openSearch:itemsPerPage>
-  <entry>
-    <id>
-    http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052</id>
-    <published>2007-09-02T18:00:04.000-07:00</published>
-    <updated>2007-09-02T18:00:04.000-07:00</updated>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#comment' />
-    <title type='text'>how to turn ...</title>
-    <content type='text'>how to turn rejection and heartbreak into
-    something positive is the big mystery of life but you're
-    managed to turn it to your advantage with a beautiful song. Who
-    was she?</content>
-    <link rel='related' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg' />
-    <link rel='alternate' type='text/html'
-    href='http://www.youtube.com/watch?v=Lnio-pqLPgg' />
-    <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052' />
-    <author>
-      <name>reneemathome</name>
-      <uri>http://gdata.youtube.com/feeds/users/reneemathome</uri>
-    </author>
-  </entry>
-  <entry>
-    <id>
-    http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/405F5D8E73538763</id>
-    <published>2007-09-02T20:51:52.000-07:00</published>
-    <updated>2007-09-02T20:51:52.000-07:00</updated>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#comment' />
-    <title type='text'>The stars are ...</title>
-    <content type='text'>The stars are flying... Make something
-    with this!!!:)</content>
-    <link rel='related' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg' />
-    <link rel='alternate' type='text/html'
-    href='http://www.youtube.com/watch?v=Lnio-pqLPgg' />
-    <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/405F5D8E73538763' />
-    <author>
-      <name>minoujill</name>
-      <uri>http://gdata.youtube.com/feeds/users/minoujill</uri>
-    </author>
-  </entry>
-  <entry>
-    <id>
-    http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/DA7550644FFCF2EC</id>
-    <published>2007-09-02T22:22:27.000-07:00</published>
-    <updated>2007-09-02T22:22:27.000-07:00</updated>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#comment' />
-    <title type='text'>awesome song!</title>
-    <content type='text'>awesome song!</content>
-    <link rel='related' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg' />
-    <link rel='alternate' type='text/html'
-    href='http://www.youtube.com/watch?v=Lnio-pqLPgg' />
-    <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/DA7550644FFCF2EC' />
-    <author>
-      <name>beeGoaTee</name>
-      <uri>http://gdata.youtube.com/feeds/users/beeGoaTee</uri>
-    </author>
-  </entry>
-  <entry>
-    <id>
-    http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/B99ACB2520430E90</id>
-    <published>2007-09-03T10:46:45.000-07:00</published>
-    <updated>2007-09-03T10:46:45.000-07:00</updated>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#comment' />
-    <title type='text'>This is GOOD!!</title>
-    <content type='text'>This is GOOD!!</content>
-    <link rel='related' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg' />
-    <link rel='alternate' type='text/html'
-    href='http://www.youtube.com/watch?v=Lnio-pqLPgg' />
-    <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/B99ACB2520430E90' />
-    <author>
-      <name>Grosh62</name>
-      <uri>http://gdata.youtube.com/feeds/users/Grosh62</uri>
-    </author>
-  </entry>
-</feed>

+ 0 - 26
tests/Zend/Gdata/YouTube/_files/ContactEntryDataSample1.xml

@@ -1,26 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<entry xmlns='http://www.w3.org/2005/Atom'
-xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
-xmlns:yt='http://gdata.youtube.com/schemas/2007'>
-    <id>http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser</id>
-    <published>1970-01-14T04:17:17.804-08:00</published>
-    <updated>2007-09-21T02:44:41.134Z</updated>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#friend' />
-    <category scheme='http://gdata.youtube.com/schemas/2007/contact.cat'
-    term='Friends' />
-    <title type='text'>testuser</title>
-    <link rel='related' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/users/testuser' />
-    <link rel='alternate' type='text/html'
-    href='http://www.youtube.com/profile?user=testuser' />
-    <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser' />
-    <author>
-      <name>davidchoimusic</name>
-      <uri>
-      http://gdata.youtube.com/feeds/users/davidchoimusic</uri>
-    </author>
-    <yt:username>testuser</yt:username>
-    <yt:status>accepted</yt:status>
-</entry>

+ 0 - 51
tests/Zend/Gdata/YouTube/_files/ContactFeedDataSample1.xml

@@ -1,51 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<feed xmlns='http://www.w3.org/2005/Atom'
-xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
-xmlns:yt='http://gdata.youtube.com/schemas/2007'>
-  <id>http://gdata.youtube.com/feeds/users/davidchoimusic/contacts</id>
-  <updated>2007-09-21T02:44:41.135Z</updated>
-  <category scheme='http://schemas.google.com/g/2005#kind'
-  term='http://gdata.youtube.com/schemas/2007#friend' />
-  <title type='text'>davidchoimusic's Contacts</title>
-  <logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
-  <link rel='alternate' type='text/html'
-  href='http://www.youtube.com/profile_friends?user=davidchoimusic' />
-  <link rel='http://schemas.google.com/g/2005#feed'
-  type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/users/davidchoimusic/contacts' />
-  <link rel='self' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/users/davidchoimusic/contacts?start-index=1&amp;max-results=5' />
-  <link rel='next' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/users/davidchoimusic/contacts?start-index=6&amp;max-results=5' />
-  <author>
-    <name>davidchoimusic</name>
-    <uri>http://gdata.youtube.com/feeds/users/davidchoimusic</uri>
-  </author>
-  <generator version='beta' uri='http://gdata.youtube.com/'>YouTube data API</generator>
-  <openSearch:totalResults>1558</openSearch:totalResults>
-  <openSearch:startIndex>1</openSearch:startIndex>
-  <openSearch:itemsPerPage>5</openSearch:itemsPerPage>
-  <entry>
-    <id>http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser</id>
-    <published>1970-01-14T04:17:17.804-08:00</published>
-    <updated>2007-09-21T02:44:41.134Z</updated>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#friend' />
-    <category scheme='http://gdata.youtube.com/schemas/2007/contact.cat'
-    term='Friends' />
-    <title type='text'>testuser</title>
-    <link rel='related' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/users/testuser' />
-    <link rel='alternate' type='text/html'
-    href='http://www.youtube.com/profile?user=testuser' />
-    <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser' />
-    <author>
-      <name>davidchoimusic</name>
-      <uri>
-      http://gdata.youtube.com/feeds/users/davidchoimusic</uri>
-    </author>
-    <yt:username>testuser</yt:username>
-    <yt:status>accepted</yt:status>
-  </entry>
-</feed>

+ 0 - 1
tests/Zend/Gdata/YouTube/_files/FormUploadTokenResponseSample.xml

@@ -1 +0,0 @@
-<response><url>http://uploads.gdata.youtube.com/action/FormDataUpload/AIwbF1_JjEQ9cGTjEAd5FKwV42SeNWJexmc5y7XR-eFj24uqbqU6NRcxKJW_4R-sYISLxQ</url><token>AIwbFAQ21fImpR2iYPaFnfuCvfbCB3qBxl5qXiZlpH3lfkungiSPoyw1iOM1gFB6Nx-wmY-kjprNT3qtdp7LJCLfngn11Ne_X9Jd44Vz8AzygtEtaDGyib5tnri0O0-V5pwcAPCHIJurOMsOpA2zInW8V8qHk2S2LheXfTXVbqc0Li9iCBpsoBGbykYU0moNoyGAaKRbSBD0oPnCv6v9Rll5Zjvivi2hQt-Br2JDb9wVeLv3qyAFaeyN6X6k32RyaAHs_n8d8d_oSriQmvS8g1HxSCS4dnoGL7tafQ4SBqnrQEb-hxFeu1ZrAwCLv</token></response>

+ 0 - 82
tests/Zend/Gdata/YouTube/_files/InboxEntryDataSample1.xml

@@ -1,82 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<entry xmlns='http://www.w3.org/2005/Atom'
-  xmlns:gml='http://www.opengis.net/gml'
-  xmlns:georss='http://www.georss.org/georss'
-  xmlns:media='http://search.yahoo.com/mrss/'
-  xmlns:yt='http://gdata.youtube.com/schemas/2007'
-  xmlns:gd='http://schemas.google.com/g/2005'>
-  <id>
-      http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55
-    </id>
-    <published>2008-06-10T13:55:32.000-07:00</published>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-      term='http://gdata.youtube.com/schemas/2007#videoMessage'/>
-    <title type='text'>andyland74sFriend sent you a video!</title>
-    <content type='text'>Check out this video!</content>
-    <link rel='alternate' type='text/html'
-      href='http://www.youtube.com/watch?v=jXE6G9CYcJs'/>
-    <link
-      rel='http://gdata.youtube.com/schemas/2007#video.responses'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/responses'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.ratings'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/ratings'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.complaints'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/complaints'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.related'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/related'/>
-    <link rel='related' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs'/>
-    <link rel='self' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55'/>
-    <link rel='edit' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55'/>
-    <author>
-      <name>andyland74sFriend</name>
-      <uri>
-        http://gdata.youtube.com/feeds/api/users/andyland74sFriend
-      </uri>
-    </author>
-    <media:group>
-      <media:title type='plain'>Learning the ABCs</media:title>
-      <media:description type='plain'>
-        A great method for teaching kids the alphabet.
-      </media:description>
-      <media:keywords>alphabet, teaching, children</media:keywords>
-      <yt:duration seconds='202'/>
-      <media:category label='Education'
-        scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>
-        Education</media:category>
-      <media:content url='http://www.youtube.com/v/jXE6G9CYcJs'
-        type='application/x-shockwave-flash' medium='video'
-        isDefault='true' expression='full' duration='202' yt:format='5'/>
-      <media:content
-      url='rtsp://rtsp2.youtube.com/ChoLENyDSANFEgGDA==/0/0/0/video.3gp'
-        type='video/3gpp' medium='video' expression='full'
-        duration='202' yt:format='1'/>
-      <media:content
-        url='rtsp://rtsp2.youtube.com/ChoLENyESARFEgGDA==/0/0/0/video.3gp'
-        type='video/3gpp' medium='video' expression='full'
-        duration='202' yt:format='6'/>
-      <media:player url='http://www.youtube.com/watch?v=jXE6G9CYcJs'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/2.jpg'
-        height='97' width='130' time='00:01:41'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/1.jpg'
-        height='97' width='130' time='00:00:50.500'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/3.jpg'
-        height='97' width='130' time='00:02:31.500'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/0.jpg'
-        height='240' width='320' time='00:01:41'/>
-    </media:group>
-    <yt:statistics viewCount='56620' favoriteCount='67'/>
-    <gd:rating min='1' max='5' numRaters='372' average='3.93'/>
-    <gd:comments>
-      <gd:feedLink
-        href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/comments'
-        countHint='481'/>
-    </gd:comments>
-    <yt:description>Check out this video!</yt:description>
-  </entry>

+ 0 - 88
tests/Zend/Gdata/YouTube/_files/InboxEntryDataSampleV2.xml

@@ -1,88 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<entry xmlns='http://www.w3.org/2005/Atom'
-  xmlns:gml='http://www.opengis.net/gml'
-  xmlns:georss='http://www.georss.org/georss'
-  xmlns:media='http://search.yahoo.com/mrss/'
-  xmlns:yt='http://gdata.youtube.com/schemas/2007'
-  xmlns:gd='http://schemas.google.com/g/2005'
-  gd:etag='W/&quot;C0QHQ347eCp7ImA9WxdQEU4.&quot;'>
-    <id>tag:youtube,2008:user:andyland74:inbox:D_uaXzLRX1U</id>
-    <published>2008-06-10T13:55:32.000-07:00</published>
-    <updated>2008-06-10T13:55:32.000-07:00</updated>
-    <app:edited
-  xmlns:app='http://www.w3.org/2007/app'>2008-06-10T20:55:32.000Z</app:edited>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-      term='http://gdata.youtube.com/schemas/2007#videoMessage'/>
-    <category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat'
-      term='surfing'/>
-    <category scheme='http://gdata.youtube.com/schemas/2007/categories.cat'
-      term='People' label='People &amp; Blogs'/>
-    <title>andyland74sFriend sent you a video!</title>
-    <summary>Check out this video!</summary>
-    <link rel='alternate' type='text/html'
-      href='http://www.youtube.com/watch?v=jXE6G9CYcJs'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.responses'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/responses?v=2'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.ratings'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/ratings?v=2'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.complaints'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/complaints?v=2'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#mobile'
-      type='text/html' href='http://m.youtube.com/details?v=jXE6G9CYcJs'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.related'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/related?v=2'/>
-    <link rel='related' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs?v=2'/>
-    <link rel='self' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55?v=2'/>
-    <link rel='edit' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55?v=2'/>
-    <author>
-      <name>andyland74sFriend</name>
-      <uri>http://gdata.youtube.com/feeds/api/users/andyland74sFriend</uri>
-    </author>
-    <media:group>
-      <media:title type='plain'>Learning the ABCs</media:title>
-      <media:description type='plain'>
-        A great method for teaching kids the alphabet.
-      </media:description>
-      <media:keywords>alphabet, teaching, children</media:keywords>
-      <yt:duration seconds='202'/>
-      <yt:videoid>jXE6G9CYcJs</yt:videoid>
-      <media:credit role='uploader' scheme='urn:youtube'>andyland74sFriend</media:credit>
-      <media:category label='Education'
-        scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>
-        Education</media:category>
-      <media:content url='http://www.youtube.com/v/jXE6G9CYcJs'
-        type='application/x-shockwave-flash' medium='video' isDefault='true'
-        expression='full' duration='202' yt:format='5'/>
-      <media:content
-        url='rtsp://rtsp2.youtube.com/ChoLENySANFEgGDA==/0/0/0/video.3gp'
-        type='video/3gpp' medium='video' expression='full'
-        duration='202' yt:format='1'/>
-      <media:content
-        url='rtsp://rtsp2.youtube.com/ChoLENySARFEgGDA==/0/0/0/video.3gp'
-        type='video/3gpp' medium='video' expression='full'
-        duration='202' yt:format='6'/>
-      <media:player url='http://www.youtube.com/watch?v=jXE6G9CYcJs'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/2.jpg'
-        height='97' width='130' time='00:01:41'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/1.jpg'
-        height='97' width='130' time='00:00:50.500'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/3.jpg'
-        height='97' width='130' time='00:02:31.500'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/0.jpg'
-        height='240' width='320' time='00:01:41'/>
-    </media:group>
-    <yt:statistics viewCount='286355' favoriteCount='201'/>
-    <gd:rating min='1' max='5' numRaters='877' average='3.88'/>
-    <gd:comments>
-      <gd:feedLink
-        href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/comments'
-        countHint='1088'/>
-    </gd:comments>
-</entry>

+ 0 - 107
tests/Zend/Gdata/YouTube/_files/InboxFeedDataSample1.xml

@@ -1,107 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<feed xmlns='http://www.w3.org/2005/Atom'
-  xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
-  xmlns:gml='http://www.opengis.net/gml'
-  xmlns:georss='http://www.georss.org/georss'
-  xmlns:media='http://search.yahoo.com/mrss/'
-  xmlns:yt='http://gdata.youtube.com/schemas/2007'
-  xmlns:gd='http://schemas.google.com/g/2005'>
-  <id>http://gdata.youtube.com/feeds/api/users/default/inbox</id>
-  <updated>2008-06-10T20:55:40.271Z</updated>
-  <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#videoMessage'/>
-  <title type='text'>Inbox of andyland74</title>
-  <logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
-  <link rel='alternate' type='text/html'
-    href='http://www.youtube.com/my_messages?folder=inbox&amp;filter=videos'/>
-  <link rel='http://schemas.google.com/g/2005#feed'
-    type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox'/>
-  <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox?...'/>
-  <author>
-    <name>andyland74</name>
-    <uri>http://gdata.youtube.com/feeds/api/users/andyland74</uri>
-  </author>
-  <generator version='beta'
-    uri='http://gdata.youtube.com/'>YouTube data API</generator>
-  <openSearch:totalResults>1</openSearch:totalResults>
-  <openSearch:startIndex>1</openSearch:startIndex>
-  <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
-  <entry>
-    <id>
-      http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55
-    </id>
-    <published>2008-06-10T13:55:32.000-07:00</published>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-      term='http://gdata.youtube.com/schemas/2007#videoMessage'/>
-    <title type='text'>andyland74sFriend sent you a video!</title>
-    <content type='text'>Check out this video!</content>
-    <link rel='alternate' type='text/html'
-      href='http://www.youtube.com/watch?v=jXE6G9CYcJs'/>
-    <link
-      rel='http://gdata.youtube.com/schemas/2007#video.responses'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/responses'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.ratings'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/ratings'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.complaints'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/complaints'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.related'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/related'/>
-    <link rel='related' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs'/>
-    <link rel='self' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55'/>
-    <link rel='edit' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55'/>
-    <author>
-      <name>andyland74sFriend</name>
-      <uri>
-        http://gdata.youtube.com/feeds/api/users/andyland74sFriend
-      </uri>
-    </author>
-    <media:group>
-      <media:title type='plain'>Learning the ABCs</media:title>
-      <media:description type='plain'>
-        A great method for teaching kids the alphabet.
-      </media:description>
-      <media:keywords>alphabet, teaching, children</media:keywords>
-      <yt:duration seconds='202'/>
-      <media:category label='Education'
-        scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>
-        Education</media:category>
-      <media:content url='http://www.youtube.com/v/jXE6G9CYcJs'
-        type='application/x-shockwave-flash' medium='video'
-        isDefault='true' expression='full' duration='202' yt:format='5'/>
-      <media:content
-      url='rtsp://rtsp2.youtube.com/ChoLENyDSANFEgGDA==/0/0/0/video.3gp'
-        type='video/3gpp' medium='video' expression='full'
-        duration='202' yt:format='1'/>
-      <media:content
-        url='rtsp://rtsp2.youtube.com/ChoLENyESARFEgGDA==/0/0/0/video.3gp'
-        type='video/3gpp' medium='video' expression='full'
-        duration='202' yt:format='6'/>
-      <media:player url='http://www.youtube.com/watch?v=jXE6G9CYcJs'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/2.jpg'
-        height='97' width='130' time='00:01:41'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/1.jpg'
-        height='97' width='130' time='00:00:50.500'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/3.jpg'
-        height='97' width='130' time='00:02:31.500'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/0.jpg'
-        height='240' width='320' time='00:01:41'/>
-    </media:group>
-    <yt:statistics viewCount='56620' favoriteCount='67'/>
-    <gd:rating min='1' max='5' numRaters='372' average='3.93'/>
-    <gd:comments>
-      <gd:feedLink
-        href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/comments'
-        countHint='481'/>
-    </gd:comments>
-    <yt:description>Check out this video!</yt:description>
-  </entry>
-</feed>

+ 0 - 119
tests/Zend/Gdata/YouTube/_files/InboxFeedDataSampleV2.xml

@@ -1,119 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<feed xmlns='http://www.w3.org/2005/Atom'
-  xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
-  xmlns:gml='http://www.opengis.net/gml'
-  xmlns:georss='http://www.georss.org/georss'
-  xmlns:media='http://search.yahoo.com/mrss/'
-  xmlns:batch='http://schemas.google.com/gdata/batch'
-  xmlns:yt='http://gdata.youtube.com/schemas/2007'
-  xmlns:gd='http://schemas.google.com/g/2005'
-  gd:etag='W/&quot;C0QHQ347eCp7ImA9WxdQEU4.&quot;'>
-  <id>tag:youtube,2008:user:andyland74:inbox</id>
-  <updated>2008-07-21T17:54:30.236Z</updated>
-  <category scheme='http://schemas.google.com/g/2005#kind'
-    term='http://gdata.youtube.com/schemas/2007#videoMessage'/>
-  <title>Inbox of andyland74</title>
-  <logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
-  <link rel='alternate' type='text/html'
-    href='http://www.youtube.com/my_messages?folder=inbox&amp;filter=videos'/>
-  <link rel='http://schemas.google.com/g/2005#feed'
-    type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox?v=2'/>
-  <link rel='http://schemas.google.com/g/2005#batch'
-    type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/batch?v=2'/>
-  <link rel='self' type='application/atom+xml'
-    href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox?...'/>
-  <link rel='service' type='application/atomsvc+xml'
-    href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox?alt=...'/>
-  <author>
-    <name>andyland74</name>
-    <uri>http://gdata.youtube.com/feeds/api/users/andyland74</uri>
-  </author>
-  <generator version='2.0'
-    uri='http://gdata.youtube.com/'>YouTube data API</generator>
-  <openSearch:totalResults>1</openSearch:totalResults>
-  <openSearch:startIndex>1</openSearch:startIndex>
-  <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
-  <entry gd:etag='W/&quot;C0QHQ347eCp7ImA9WxdQEU4.&quot;'>
-    <id>tag:youtube,2008:user:andyland74:inbox:D_uaXzLRX1U</id>
-    <published>2008-06-10T13:55:32.000-07:00</published>
-    <updated>2008-06-10T13:55:32.000-07:00</updated>
-    <app:edited
-  xmlns:app='http://www.w3.org/2007/app'>2008-06-10T20:55:32.000Z</app:edited>
-    <category scheme='http://schemas.google.com/g/2005#kind'
-      term='http://gdata.youtube.com/schemas/2007#videoMessage'/>
-    <category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat'
-      term='surfing'/>
-    <category scheme='http://gdata.youtube.com/schemas/2007/categories.cat'
-      term='People' label='People &amp; Blogs'/>
-    <title>andyland74sFriend sent you a video!</title>
-    <summary>Check out this video!</summary>
-    <link rel='alternate' type='text/html'
-      href='http://www.youtube.com/watch?v=jXE6G9CYcJs'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.responses'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/responses?v=2'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.ratings'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/ratings?v=2'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.complaints'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/complaints?v=2'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#mobile'
-      type='text/html' href='http://m.youtube.com/details?v=jXE6G9CYcJs'/>
-    <link rel='http://gdata.youtube.com/schemas/2007#video.related'
-      type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/related?v=2'/>
-    <link rel='related' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs?v=2'/>
-    <link rel='self' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55?v=2'/>
-    <link rel='edit' type='application/atom+xml'
-      href='http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55?v=2'/>
-    <author>
-      <name>andyland74sFriend</name>
-      <uri>http://gdata.youtube.com/feeds/api/users/andyland74sFriend</uri>
-    </author>
-    <media:group>
-      <media:title type='plain'>Learning the ABCs</media:title>
-      <media:description type='plain'>
-        A great method for teaching kids the alphabet.
-      </media:description>
-      <media:keywords>alphabet, teaching, children</media:keywords>
-      <yt:duration seconds='202'/>
-      <yt:videoid>jXE6G9CYcJs</yt:videoid>
-      <media:credit role='uploader' scheme='urn:youtube'>andyland74sFriend</media:credit>
-      <media:category label='Education'
-        scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>
-        Education</media:category>
-      <media:content url='http://www.youtube.com/v/jXE6G9CYcJs'
-        type='application/x-shockwave-flash' medium='video' isDefault='true'
-        expression='full' duration='202' yt:format='5'/>
-      <media:content
-        url='rtsp://rtsp2.youtube.com/ChoLENySANFEgGDA==/0/0/0/video.3gp'
-        type='video/3gpp' medium='video' expression='full'
-        duration='202' yt:format='1'/>
-      <media:content
-        url='rtsp://rtsp2.youtube.com/ChoLENySARFEgGDA==/0/0/0/video.3gp'
-        type='video/3gpp' medium='video' expression='full'
-        duration='202' yt:format='6'/>
-      <media:player url='http://www.youtube.com/watch?v=jXE6G9CYcJs'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/2.jpg'
-        height='97' width='130' time='00:01:41'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/1.jpg'
-        height='97' width='130' time='00:00:50.500'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/3.jpg'
-        height='97' width='130' time='00:02:31.500'/>
-      <media:thumbnail url='http://img.youtube.com/vi/jXE6G9CYcJs/0.jpg'
-        height='240' width='320' time='00:01:41'/>
-    </media:group>
-    <yt:statistics viewCount='286355' favoriteCount='201'/>
-    <gd:rating min='1' max='5' numRaters='877' average='3.88'/>
-    <gd:comments>
-      <gd:feedLink
-        href='http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/comments'
-        countHint='1088'/>
-    </gd:comments>
-  </entry>
-</feed>

+ 0 - 30
tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSample1.xml

@@ -1,30 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<entry xmlns='http://www.w3.org/2005/Atom'
-xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
-xmlns:media='http://search.yahoo.com/mrss/'
-xmlns:gd='http://schemas.google.com/g/2005' 
-xmlns:yt='http://gdata.youtube.com/schemas/2007'>
-  <id>
-  http://gdata.youtube.com/feeds/users/testuser/playlists/46A2F8C9B36B6FE7</id>
-  <published>2007-01-29T22:42:12.000-08:00</published>
-  <updated>2007-09-20T13:42:19.000-07:00</updated>
-  <category scheme='http://gdata.youtube.com/schemas/2007/tags.cat'
-  term='music' />
-  <category scheme='http://schemas.google.com/g/2005#kind'
-  term='http://gdata.youtube.com/schemas/2007#playlistLink' />
-  <title type='text'>YouTube Musicians</title>
-  <content type='text'>Music from talented people on YouTube.</content>
-  <link rel='alternate' type='text/html'
-  href='http://www.youtube.com/view_play_list?p=46A2F8C9B36B6FE7' />
-  <link rel='related' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/users/testuser' />
-  <link rel='self' type='application/atom+xml'
-  href='http://gdata.youtube.com/feeds/users/testuser/playlists/46A2F8C9B36B6FE7' />
-  <author>
-    <name>testuser</name>
-    <uri>http://gdata.youtube.com/feeds/users/testuser</uri>
-  </author>
-  <yt:description>Music from talented people on YouTube.</yt:description>
-  <gd:feedLink rel='http://gdata.youtube.com/schemas/2007#playlist'
-  href='http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7' />
-</entry>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio