<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zend_Gdata_YouTube_VideoEntry &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/zend_gdata_youtube_videoentry/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Force Zend Casting and Help the IDE Autocompletion</title>
		<link>/2010/03/15/force-zend-casting-and-help-the-ide-autocompletion/</link>
		<comments>/2010/03/15/force-zend-casting-and-help-the-ide-autocompletion/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 14:28:02 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Autocomplete]]></category>
		<category><![CDATA[YouTube]]></category>
		<category><![CDATA[Zend_Gdata_YouTube_VideoEntry]]></category>

		<guid isPermaLink="false">/?p=1320</guid>
		<description><![CDATA[IDEs and Autocompletion One of my favorite things in IDEs, in my case Eclipse for Mac, is that they offer you the option of autocompletion. No developer knows the entire set of functions of the language he uses, neither the set of parameters of them. That&#8217;s why IDEs come to help. In many cases when &#8230; <a href="/2010/03/15/force-zend-casting-and-help-the-ide-autocompletion/" class="more-link">Continue reading <span class="screen-reader-text">Force Zend Casting and Help the IDE Autocompletion</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/" rel="bookmark" title="Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube">Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/04/26/mysql-expressions-in-zend-framework/" rel="bookmark" title="MySQL Expressions in Zend Framework">MySQL Expressions in Zend Framework </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>IDEs and Autocompletion</h2>
<p>One of my favorite things in IDEs, in my case Eclipse for Mac, is that they offer you the option of autocompletion. No developer knows the entire set of functions of the language he uses, neither the set of parameters of them. That&#8217;s why IDEs come to help.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2010/03/Eclipse.Autocompletion.png"><img class="aligncenter size-full wp-image-1325" title="Eclipse Autocompletion" src="/wp-content/uploads/2010/03/Eclipse.Autocompletion.png" alt="" width="430" height="185" srcset="/wp-content/uploads/2010/03/Eclipse.Autocompletion.png 430w, /wp-content/uploads/2010/03/Eclipse.Autocompletion-300x129.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<p>In many cases when casting is not obvious and method call chain is to large your IDE may refuse to help you with this brilliant functionality. To be more precise let me give you an example.</p>
<p>In Zend Framework I was trying to fetch a RSS via Gdata interface. Something like that:</p>
<pre lang="php" escaped="true">$videoFeed = $gdata-&gt;getUserUploads('youtube_username');
foreach ($videoFeed as $entry) {
    // do something
}
</pre>
<p>The problem is that whenever I try to do <strong>$entry-&gt;</strong> in the body of the <strong>foreach</strong> loop I don&#8217;t see what methods are supported by the <strong>Zend_Gdata_YouTube_VideoEntry</strong> class. So I tried to force the casting of $entry to this class definition and it worked like a charm for me. The thing I&#8217;ve done was to add a definition of $entry before the loop body:</p>
<pre lang="php" escaped="true">$videoFeed = $gdata-&gt;getUserUploads('youtube_username');
$entry = new Zend_Gdata_YouTube_VideoEntry();
foreach  ($videoFeed as $entry) {
    // do something
}
</pre>
<p>Than whenever you try to type $entry-&gt; you&#8217;d receive a list of methods from the class definition of <strong>Zend_Gdata_YouTube_VideoEntry</strong>.</p>
<p>Thanks to <a href="http://ganoro.blogspot.com/">Roy Ganor</a> there&#8217;s a more elegant way to do this, simply by adding @var comment:</p>
<pre lang="php">
/* @var $entry Zend_Gdata_YouTube_VideoEntry */
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/" rel="bookmark" title="Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube">Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/04/26/mysql-expressions-in-zend-framework/" rel="bookmark" title="MySQL Expressions in Zend Framework">MySQL Expressions in Zend Framework </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/03/15/force-zend-casting-and-help-the-ide-autocompletion/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
