]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Define the member variable N
authorCraig Andrews <candrews@integralblue.com>
Wed, 12 Aug 2009 15:51:43 +0000 (11:51 -0400)
committerCraig Andrews <candrews@integralblue.com>
Wed, 12 Aug 2009 15:53:46 +0000 (11:53 -0400)
N is defined in the DB_DataObject class, which this class kind of extends. So to keep a consistent interface for consumers, we need to have N defined here.

lib/arraywrapper.php

index a8a12b3bb35668ec1bc8e41872e8d5a7ab962b09..47ae057dccdf96473df6bda7041cff71d15094e3 100644 (file)
@@ -25,12 +25,14 @@ class ArrayWrapper
 {
     var $_items = null;
     var $_count = 0;
+    var $N = 0;
     var $_i = -1;
 
     function __construct($items)
     {
         $this->_items = $items;
         $this->_count = count($this->_items);
+        $this->N = $this->_count;
     }
 
     function fetch()
@@ -76,4 +78,4 @@ class ArrayWrapper
         $item =& $this->_items[$this->_i];
         return call_user_func_array(array($item, $name), $args);
     }
-}
\ No newline at end of file
+}