Bolt\Legacy\Storage::hydrateRows PHP Method

hydrateRows() private method

Hydrate database rows into objects.
private hydrateRows ( array | string $contenttype, array $rows, boolean $getTaxoAndRel = true ) : array
$contenttype array | string
$rows array
$getTaxoAndRel boolean
return array
    private function hydrateRows($contenttype, $rows, $getTaxoAndRel = true)
    {
        // Make sure content is set, and all content has information about its contenttype
        $objects = [];
        foreach ($rows as $row) {
            $objects[$row['id']] = $this->getContentObject($contenttype, $row);
        }
        $this->getRepeaters($objects);
        if ($getTaxoAndRel) {
            // Make sure all content has their taxonomies and relations
            $this->getTaxonomy($objects);
            $this->getRelation($objects);
        }
        return $objects;
    }