Skip to content
Browse files

add spotifyalbumiterator::count()

  • Loading branch information...
1 parent 3714c75 commit af9a96165ade6b7c2198b6c07aa9cd6e38739f9d @vilhelmk committed Oct 25, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 albumiterator.c
View
7 albumiterator.c
@@ -113,6 +113,12 @@ PHP_METHOD(SpotifyAlbumIterator, valid)
}
}
+PHP_METHOD(SpotifyAlbumIterator, count)
+{
+ spotifyalbumiterator_object *p = (spotifyalbumiterator_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+ RETURN_LONG(p->length);
+}
+
function_entry spotifyalbumiterator_methods[] = {
PHP_ME(SpotifyAlbumIterator, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR)
PHP_ME(SpotifyAlbumIterator, __destruct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR)
@@ -121,6 +127,7 @@ function_entry spotifyalbumiterator_methods[] = {
PHP_ME(SpotifyAlbumIterator, next, NULL, ZEND_ACC_PUBLIC)
PHP_ME(SpotifyAlbumIterator, rewind, NULL, ZEND_ACC_PUBLIC)
PHP_ME(SpotifyAlbumIterator, valid, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(SpotifyAlbumIterator, count, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};

0 comments on commit af9a961

Please sign in to comment.
Something went wrong with that request. Please try again.