reset() public method

Resets our internal pointer to the beginning of the list. Use this to hide the internal storage (array, list, etc.) from client objects.
public reset ( ) : Turba_Object
return Turba_Object The next object in the list.
コード例 #1
0
ファイル: List.php プロジェクト: DSNS-LAB/Dmail
 /**
  * @param integer $numDisplayed  Set to the number of displayed contacts.
  * @param object $filter         A Turba_View_List filter object.
  * @param string $page           The currently displayed page.
  *
  * @return string
  */
 protected function _get(&$numDisplayed, $filter, $page)
 {
     ob_start();
     $width = floor(90 / (count($this->columns) + 1));
     $own = $GLOBALS['prefs']->getValue('own_contact');
     if (strpos($own, ';')) {
         list($own_source, $own_id) = explode(';', $own);
     } else {
         $own_source = $own_id = null;
     }
     $vars = Horde_Variables::getDefaultVariables();
     include TURBA_TEMPLATES . '/browse/column_headers.inc';
     $numDisplayed = 0;
     $this->list->reset();
     while ($ob = $this->list->next()) {
         if ($filter->skip($ob)) {
             continue;
         }
         include TURBA_TEMPLATES . '/browse/row.inc';
         $numDisplayed++;
     }
     include TURBA_TEMPLATES . '/browse/column_footers.inc';
     return ob_get_clean();
 }