public function LastItem()
    {
        $pageLength = $this->getPageLength();
        if (!$pageLength) {
            return $this->getTotalItems();
        } elseif ($start = $this->getPageStart()) {
            return min($start + $pageLength, $this->getTotalItems());
        } else {
            return min($pageLength, $this->getTotalItems());
        }
    }