<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Jeremy Cook</title>
	<atom:link href="http://jeremycook.ca/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeremycook.ca</link>
	<description>Random musings on web development and PHP</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:22:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Implementing the ArrayAccess Interface by Jeremy Cook&#8217;s Blog: Implementing the ArrayAccess Interface &#124; Scripting4You Blog</title>
		<link>http://jeremycook.ca/2012/01/22/implementing-the-arrayaccess-interface/comment-page-1/#comment-4785</link>
		<dc:creator>Jeremy Cook&#8217;s Blog: Implementing the ArrayAccess Interface &#124; Scripting4You Blog</dc:creator>
		<pubDate>Fri, 03 Feb 2012 22:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=242#comment-4785</guid>
		<description>[...] Cook is back with the next part of his series looking at the handy features PHP&#039;s SPL provides. In this new post he looks at the ArrayAccess interface and how it can make your data more accessible to PHP&#039;s own [...]</description>
		<content:encoded><![CDATA[<p>[...] Cook is back with the next part of his series looking at the handy features PHP&#039;s SPL provides. In this new post he looks at the ArrayAccess interface and how it can make your data more accessible to PHP&#039;s own [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Implementing the ArrayAccess Interface by Jeremy Cook Blog: Umsetzung der ArrayAccess Schnittstelle &#124; PHP Boutique</title>
		<link>http://jeremycook.ca/2012/01/22/implementing-the-arrayaccess-interface/comment-page-1/#comment-4635</link>
		<dc:creator>Jeremy Cook Blog: Umsetzung der ArrayAccess Schnittstelle &#124; PHP Boutique</dc:creator>
		<pubDate>Thu, 02 Feb 2012 23:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=242#comment-4635</guid>
		<description>[...] Teil seiner Serie Blick auf die praktischen Funktionen von PHP  SPL  zur Verfügung stellt. In  dieser neuen post  schaut er auf die ArrayAccess Schnittstelle und wie sie Ihre Daten machen besser zugänglich zu [...]</description>
		<content:encoded><![CDATA[<p>[...] Teil seiner Serie Blick auf die praktischen Funktionen von PHP  SPL  zur Verfügung stellt. In  dieser neuen post  schaut er auf die ArrayAccess Schnittstelle und wie sie Ihre Daten machen besser zugänglich zu [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creating a Persistent Login Mechanism by Jeremy Cook</title>
		<link>http://jeremycook.ca/2010/03/28/creating-a-persistent-login-mechanism/comment-page-1/#comment-4599</link>
		<dc:creator>Jeremy Cook</dc:creator>
		<pubDate>Wed, 01 Feb 2012 21:47:26 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=73#comment-4599</guid>
		<description>Good point and to be totally truthful I&#039;m not entirely sure why I suggested two fields. In my defense I wrote that quite a while ago.. The only reason for the two random fields is that it obfusticates things a little more. If an attacker was able to observe a number of cookies they might be able to work out that the ones called &#039;pl&#039; have a common purpose. However, that would only provide a negligible benefit. It looks like one db field would be quite enough.</description>
		<content:encoded><![CDATA[<p>Good point and to be totally truthful I&#8217;m not entirely sure why I suggested two fields. In my defense I wrote that quite a while ago.. The only reason for the two random fields is that it obfusticates things a little more. If an attacker was able to observe a number of cookies they might be able to work out that the ones called &#8216;pl&#8217; have a common purpose. However, that would only provide a negligible benefit. It looks like one db field would be quite enough.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zend_Form and Validating Values for Multiple Column DB Keys by Jeremy Cook</title>
		<link>http://jeremycook.ca/2011/10/25/zend_form-and-validating-values-for-multiple-column-db-keys/comment-page-1/#comment-4598</link>
		<dc:creator>Jeremy Cook</dc:creator>
		<pubDate>Wed, 01 Feb 2012 21:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=219#comment-4598</guid>
		<description>isValid($data) is a method of Zend_Form which I&#039;m subclassing on the form object I created for the form. Sorry, I didn&#039;t make that very clear in the text.</description>
		<content:encoded><![CDATA[<p>isValid($data) is a method of Zend_Form which I&#8217;m subclassing on the form object I created for the form. Sorry, I didn&#8217;t make that very clear in the text.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zend_Form and Validating Values for Multiple Column DB Keys by Pablo Monroy</title>
		<link>http://jeremycook.ca/2011/10/25/zend_form-and-validating-values-for-multiple-column-db-keys/comment-page-1/#comment-4585</link>
		<dc:creator>Pablo Monroy</dc:creator>
		<pubDate>Tue, 31 Jan 2012 22:31:26 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=219#comment-4585</guid>
		<description>The function public function isValid($data) is there on  Form, View or Controller.</description>
		<content:encoded><![CDATA[<p>The function public function isValid($data) is there on  Form, View or Controller.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creating a Persistent Login Mechanism by Craig</title>
		<link>http://jeremycook.ca/2010/03/28/creating-a-persistent-login-mechanism/comment-page-1/#comment-4575</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Tue, 31 Jan 2012 11:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=73#comment-4575</guid>
		<description>Thanks for the article, useful pointers, I&#039;m building something very similar.

Any reason you don&#039;t just do something like

cookieName=&quot;pl&quot; (for persisted login)
cookieValue=&quot;BigRandomGarbagesdffjkshjdifhioshdfijsdfjisdjfsdf&quot;

I can&#039;t see any good reason for two DB fields, could you explain your reasoning a bit more?

Thanks,

Craig</description>
		<content:encoded><![CDATA[<p>Thanks for the article, useful pointers, I&#8217;m building something very similar.</p>
<p>Any reason you don&#8217;t just do something like</p>
<p>cookieName=&#8221;pl&#8221; (for persisted login)<br />
cookieValue=&#8221;BigRandomGarbagesdffjkshjdifhioshdfijsdfjisdjfsdf&#8221;</p>
<p>I can&#8217;t see any good reason for two DB fields, could you explain your reasoning a bit more?</p>
<p>Thanks,</p>
<p>Craig</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using the Countable Interface by Niels Bom</title>
		<link>http://jeremycook.ca/2012/01/01/using-the-countable-interface/comment-page-1/#comment-4348</link>
		<dc:creator>Niels Bom</dc:creator>
		<pubDate>Mon, 09 Jan 2012 16:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=230#comment-4348</guid>
		<description>Hi,

Thanks for this post, I think I&#039;ll be using the Countable interface sometime.

You say
&lt;blockquote&gt;
Countable can also be used to signal the state of an object.
&lt;/blockquote&gt;

and
&lt;blockquote&gt;
the further you move the count() method away from this functionality the less intuitive the code becomes
&lt;/blockquote&gt;

I&#039;d argue that you didn&#039;t heed your own warning :-). The example with the Countable records that were live was better imho.

Thanks again for the post!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for this post, I think I&#8217;ll be using the Countable interface sometime.</p>
<p>You say</p>
<blockquote><p>
Countable can also be used to signal the state of an object.
</p></blockquote>
<p>and</p>
<blockquote><p>
the further you move the count() method away from this functionality the less intuitive the code becomes
</p></blockquote>
<p>I&#8217;d argue that you didn&#8217;t heed your own warning <img src='http://jeremycook.ca/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . The example with the Countable records that were live was better imho.</p>
<p>Thanks again for the post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using the Countable Interface by Jeremy Cook&#8217;s Blog: Using the Countable Interface &#124; Scripting4You Blog</title>
		<link>http://jeremycook.ca/2012/01/01/using-the-countable-interface/comment-page-1/#comment-4320</link>
		<dc:creator>Jeremy Cook&#8217;s Blog: Using the Countable Interface &#124; Scripting4You Blog</dc:creator>
		<pubDate>Sat, 07 Jan 2012 01:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=230#comment-4320</guid>
		<description>[...] = {&quot;data_track_clickback&quot;:true}; In a recent post to his blog Jeremy Cook has a tutorial about using the Countable interface (part of the SPL) in your objects to make them play nicely with functions like count.   PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] = {&quot;data_track_clickback&quot;:true}; In a recent post to his blog Jeremy Cook has a tutorial about using the Countable interface (part of the SPL) in your objects to make them play nicely with functions like count.   PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using the Countable Interface by Jeremy Cook</title>
		<link>http://jeremycook.ca/2012/01/01/using-the-countable-interface/comment-page-1/#comment-4317</link>
		<dc:creator>Jeremy Cook</dc:creator>
		<pubDate>Fri, 06 Jan 2012 13:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=230#comment-4317</guid>
		<description>Hi Julien,

Thanks for the comment. I don&#039;t think that either example you post is better than the other: both are totally valid and how you use the count() method is entirely down to the developers taste. I personally prefer calling the count() method through the count function though. One of the primary purposes of the predefined interfaces is to allow you to hook into and to override core PHP behaviour so to me implementing Countable and then not using it through the count function just feels wrong. However, that really is just my subjective opinion for what it&#039;s worth!</description>
		<content:encoded><![CDATA[<p>Hi Julien,</p>
<p>Thanks for the comment. I don&#8217;t think that either example you post is better than the other: both are totally valid and how you use the count() method is entirely down to the developers taste. I personally prefer calling the count() method through the count function though. One of the primary purposes of the predefined interfaces is to allow you to hook into and to override core PHP behaviour so to me implementing Countable and then not using it through the count function just feels wrong. However, that really is just my subjective opinion for what it&#8217;s worth!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using the Countable Interface by Julien</title>
		<link>http://jeremycook.ca/2012/01/01/using-the-countable-interface/comment-page-1/#comment-4313</link>
		<dc:creator>Julien</dc:creator>
		<pubDate>Fri, 06 Jan 2012 09:41:41 +0000</pubDate>
		<guid isPermaLink="false">http://jeremycook.ca/?p=230#comment-4313</guid>
		<description>Thank you for your post, it&#039;s really a good idea to provide some example for interfaces in SPL. However, I don&#039;t really get the point here. Why would be writing this code:

&lt;code&gt;
if (count($obj)) {
     //$_data is not null, proceed accordingly.
}
&lt;/code&gt;

better then writing:

&lt;code&gt;
if ($obj-&gt;count()) {
     //$_data is not null, proceed accordingly.
}
&lt;/code&gt;

?</description>
		<content:encoded><![CDATA[<p>Thank you for your post, it&#8217;s really a good idea to provide some example for interfaces in SPL. However, I don&#8217;t really get the point here. Why would be writing this code:</p>
<p><code><br />
if (count($obj)) {<br />
     //$_data is not null, proceed accordingly.<br />
}<br />
</code></p>
<p>better then writing:</p>
<p><code><br />
if ($obj-&gt;count()) {<br />
     //$_data is not null, proceed accordingly.<br />
}<br />
</code></p>
<p>?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

