public function handle($mixed): Pagination
    {
        if ($mixed instanceof Collection) {
            $this->mixed = $mixed;
            $this->nb_pages = ceil(max(count($mixed), 1) / max($this->nb_per_page, 1));
        } else {
            if ($mixed instanceof \Countable) {
                $this->mixed = $mixed;
                $this->nb_pages = ceil(max(count($mixed), 1) / max($this->nb_per_page, 1));
            } else {
                if (is_int($mixed)) {
                    $this->mixed = $mixed;
                    $this->nb_pages = ceil(max($mixed, 1) / max($this->nb_per_page, 1));
                } else {
                    trigger_error('Parameter of Pagination::handle must be an Collection object or integer', E_USER_WARNING);
                }
            }
        }

        return $this;
    }