ZF-10242: Zend_Gdata_App_Feed does not implement Countable

Issue Type: Improvement Created: 2010-07-28T15:00:15.000+0000 Last Updated: 2010-08-21T16:47:32.000+0000 Status: Resolved Fix version(s): - 1.11.0 (02/Nov/10)

Reporter: Alexander Steshenko (lcf) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Gdata

Related issues: Attachments:


to be able to do

<pre class="highlight">
$contacts = $gdata->getFeed($contactsQuery);
$total = count($contacts);

Zend_Gdata_App_Feed needs to be implementing Countable interface. It already implements Iterator and ArrayAccess.

Now the only way is

<pre class="highlight">
$contacts = $gdata->getFeed($contactsQuery);
$total = $contacts->count();


Posted by Ramon Henrique Ornelas (ramon) on 2010-07-28T21:12:51.000+0000

I consider a improvement and not a bug.

Posted by Alexander Steshenko (lcf) on 2010-07-28T21:30:59.000+0000

It is technically an improvement, but it leads to bugs (because of the wrong expectations) and I'm almost sure that it was supposed to be so, just somebody accidentally missed 'Countable'.

Posted by Ramon Henrique Ornelas (ramon) on 2010-08-21T16:47:18.000+0000

Fixed with r22880.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.