Esempio n. 1
0
 private function create_accounts_from_select($rows)
 {
     $accounts = new accounts();
     foreach ($rows as $row) {
         if (isset($this->cache[$row['id']])) {
             $new = $this->cache[$row['id']];
         } else {
             $new = account::create($row['name'], $row['email'], $row['created'], $row['modified']);
             $this->cache[$row['id']] = $new;
         }
         $accounts->push($new);
     }
     return $accounts;
 }