Exemple #1
0
 /**
  * 转换为一个数组
  *
  * @param Result $result
  * @return array
  */
 public function toArray(Result $result)
 {
     $data = array();
     if ($result->valid()) {
         if (!$result->current()) {
             return $data;
         }
     }
     while ($result->valid()) {
         $data[] = $result->current();
         $result->next();
     }
     return $data;
 }
Exemple #2
0
 public function next()
 {
     $this->result->next();
 }