Map data rows to model array

@param array $rows
@return array
433319
public function mapModels($rows){
        $rst = array();
        foreach($rows as $row){
            $rst[] = $this->map($row);
        }
        
        return $rst;
    }
108438
public function setRows($rows)
    {
        $this->rows = $rows;
        $this->rowsString = sprintf('`%s`', implode('`,`', $this->rows));

        return $this;
    }
872316
public static function convertToArray($row)
    {
        $data = $row instanceof Arrayable ? $row->toArray() : (array) $row;

        foreach ($data as &$value) {
            if (is_object($value) || is_array($value)) {
                $value = self::convertToArray($value);
            }

            unset($value);
        }

        return $data;
    }
158647
public function extractGroupsFromRows(array $rows)
    {
        $groups = array();

        foreach ($rows as $row) {
            $group = new Group();
            $group->id = (int)$row['id'];
            $group->created = (int)$row['created'];
            $group->creatorId = (int)$row['creator_id'];
            $group->modified = (int)$row['modified'];
            $group->modifierId = (int)$row['modifier_id'];
            $group->identifier = $row['name'];

            $groups[] = $group;
        }

        return $groups;
    }
475148
public function create($row = array()){
        $class = $this->modelClass;
        $model = new $class($this->db, $row);
        $model->setAttribute('table', $this->table)->setAttribute('pk', $this->pk);
        
        return $model;
    }
1192552
public function data($rows=null)
    {
        if ($rows!==null) {
            $this->rows = $rows;
            return $this;
        } else {
            return $this->rows;
        }
    }
1131771
public function replaceRows(array $rows): array
    {
        if (null === $this->data) {
            $this->buildIndex();
        }

        $list = [];
        foreach ($rows as $key => $row) {
            if (strpos($key, '@@')) {
                $key = $this->getNewKey();
            }
            $this->data[$key] = $list[$key] = $row;
        }

        if ($list) {
            $this->save();
        }

        return $list;
    }
558121
protected static function indexByParent($rows)
    {
        $parents = [];

        foreach ($rows as $row) {
            $parents[(int) $row['parent_id']][(int) $row['child_id']] = (int) $row['child_id'];
        }

        return $parents;
    }
855632
public static function transformColumnNames(&$rows)
    {
        $columnNames = array_keys(current($rows));
        foreach ($rows as &$row) {
            foreach ($columnNames as $name) {
                $row[ strtolower($name) ] = &$row[ $name ];
                unset($row[ $name ]);
            }
        }
    }
401265
public function extractTagListFromRows(array $rows)
    {
        $tagList = [];
        foreach ($rows as $row) {
            $tagId = (int) $row['eztags_id'];
            if (!isset($tagList[$tagId])) {
                $tag = new Tag();
                $tag->id = (int) $row['eztags_id'];
                $tag->parentTagId = (int) $row['eztags_parent_id'];
                $tag->mainTagId = (int) $row['eztags_main_tag_id'];
                $tag->keywords = [];
                $tag->depth = (int) $row['eztags_depth'];
                $tag->pathString = $row['eztags_path_string'];
                $tag->modificationDate = (int) $row['eztags_modified'];
                $tag->remoteId = $row['eztags_remote_id'];
                $tag->alwaysAvailable = ((int) $row['eztags_language_mask'] & 1) ? true : false;
                $tag->mainLanguageCode = $this->languageHandler->load($row['eztags_main_language_id'])->languageCode;
                $tag->languageIds = $this->languageMaskGenerator->extractLanguageIdsFromMask((int) $row['eztags_language_mask']);
                $tagList[$tagId] = $tag;
            }

            if (!isset($tagList[$tagId]->keywords[$row['eztags_keyword_locale']])) {
                $tagList[$tagId]->keywords[$row['eztags_keyword_locale']] = $row['eztags_keyword_keyword'];
            }
        }

        return array_values($tagList);
    }
1297697
protected function buildRows(array $data)
    {
        $this->rows = collect($data)->map(function ($model, $number) {
            return new Row($number, $model);
        });

        if ($this->rowsCallback) {
            $this->rows->map($this->rowsCallback);
        }
    }
181022
public static function mapArraybleRow($row): array
    {
        // When dealing with eloquent models, we'll skip the relations
        // as we won't be able to display them anyway.
        if (method_exists($row, 'attributesToArray')) {
            return $row->attributesToArray();
        }

        if ($row instanceof Arrayable) {
            return $row->toArray();
        }

        // Convert StdObjects to arrays
        if (is_object($row)) {
            return json_decode(json_encode($row), true);
        }

        return $row;
    }
836311
public function setRows($rows = [])
    {
        if (Arr::isAssoc($rows)) {
            foreach ($rows as $key => $item) {
                $this->rows[] = [$key, $item];
            }

            return $this;
        }

        $this->rows = $rows;

        return $this;
    }
774714
public function extractUserPreferencesFromRows(array $rows): array
    {
        $userPreferences = [];
        foreach ($rows as $row) {
            $userPreferences[] = $this->extractUserPreferenceFromRow($row);
        }

        return $userPreferences;
    }
780538
protected function inferRow($row)
    {
        $rowFields = [];
        foreach ($row as $k => $v) {
            $rowFields[$k] = FieldsFactory::infer($v, (object) ['name' => $k], $this->lenient);
        }

        return $rowFields;
    }
1360250
protected function prepareRows(array $data)
    {
        $rows = [];

        foreach ($data as $date => $levels) {
            $rows[$date] = array_merge(compact('date'), $levels);
        }

        return $rows;
    }
218572
public function addOptionsToFilters(array $rows)
    {
        if (is_array($rows) && count($rows)) {
            foreach ($rows as $key => $row) {
                if (!empty($row['options'])) {
                    $rows[$key]['options'] = $this->getOptionsFromUidList($row['options']);
                } else {
                    $rows[$key]['options'] = array();
                }
            }
            return $rows;
        } else {
            return array();
        }
    }