private function calculatePageLimitAndOffset()
    {
        $pageUri = '';
        $pageUri = Url::segment(3);
        $pageNumber = ($pageUri !== '') ? $pageUri : 0;

        if ($pageNumber) {
            //calculate starting point of pagination
            $start = ($this->getPageNumber() - 1) * $this->perPage;
        } else {
            $start = 0; //set start to 0 by default.
        }

        $this->setPageNumber($pageNumber);
        $this->setPaginationOffset($start);
    }