public function setPaginationFromQuery(SQLSelect $query)
    {
        if ($limit = $query->getLimit()) {
            $this->setPageLength($limit['limit']);
            $this->setPageStart($limit['start']);
            $this->setTotalItems($query->unlimitedRowCount());
        }
        return $this;
    }