public static function instantiateRecords($records)
    {
        foreach ($records as &$record) {
            $className = static::_getRecordClass($record);
            $record = new $className($record);
        }

        return $records;
    }
public static function instantiateRecords($records)
    {
        foreach ($records as &$record) {
            $className = static::_getRecordClass($record);
            $record = new $className($record);
        }

        return $records;
    }
public static function instantiateRecords ( $ records ) { foreach ( $ records as & $ record ) { $ className = static :: _getRecordClass ( $ record ) ; $ record = new $ className ( $ record ) ; } return $ records ; }
Converts an array of database records to a model corresponding to each record. Will attempt to use the record's Class field value to as the class to instantiate as or the name of this class if none is provided.

@param array $record An array of database rows.
@return static|null An array of instantiated ActiveRecord models from the provided data.
Converts an array of database records to a model corresponding to each record . Will attempt to use the record s Class field value to as the class to instantiate as or the name of this class if none is provided .