Beispiel #1
0
 public static function populateObjects(PDOStatement $stmt)
 {
     $results = array();
     $cls = PreferenciaPeer::getOMClass();
     $cls = substr('.' . $cls, strrpos('.' . $cls, '.') + 1);
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key = PreferenciaPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj = PreferenciaPeer::getInstanceFromPool($key))) {
             $results[] = $obj;
         } else {
             $obj = new $cls();
             $obj->hydrate($row);
             $results[] = $obj;
             PreferenciaPeer::addInstanceToPool($obj, $key);
         }
     }
     $stmt->closeCursor();
     return $results;
 }