public function paginate($maxPerPage, $initialPage = 1, $key = null)
    {
        $result = [];
        $page = $initialPage;
        $array = $this->array;

        if ($maxPerPage <= 0) {
            return $result;
        }

        if (is_null($key) === false) {
            $array = $this->get($key);
        }

        $arrCount = count($array);

        for ($offset = 0; $offset < $arrCount;) {
            $slice = array_slice($array, $offset, $maxPerPage, true);
            $result[$page] = $slice;

            ++$page;
            $offset += count($slice);
        }

        return $result;
    }