<?php

class CategorizationsExporter extends BaseDataExporter
{
    public function isOnlyForAdmin(): bool
    {
        return false;
    }

    public function getData(): array
    {
        $this->db->reset_query();
        if ($this->exportOnlyUserItems == true || !$this->isAdmin) {
            $this->db->where('username', $this->username);
        }

        $data = $this->db->get('astrolabeprofile')->result_array();
        return ['info' => sizeof($data), 'data' => json_encode($data)];
    }
}
