public function setColumns($columns)
{
if (isset($columns['key'])) {
$columns = [$columns];
}
usort($columns, [$this, 'sort']);
$this->columns = [];
$this->columnKeys = [];
foreach ($columns as $c) {
$c['key'] = strtolower($c['key']);
$this->columns[] = $c;
$this->columnKeys[] = $c['key'];
}
return $this;
}