public function setRows($rows) { if (isset($rows['key'])) { $rows = [$rows]; } usort($rows, [$this, 'sort']); $this->rows = []; foreach ($rows as $r) { $r['key'] = strtolower($r['key']); $this->rows[] = $r; } return $this; }