private function calculateOffset()
    {
        // When no limit is provided, all items are on one page, so the offset is unreasonable
        if (! $this->hasLimit()) {
            $this->setOffset(0);
            return;
        }

        $offset = ($this->getPage() * $this->getLimit()) - $this->getLimit();

        $this->setOffset((int)$offset);
    }
private function calculateOffset()
    {
        // When no limit is provided, all items are on one page, so the offset is unreasonable
        if (! $this->hasLimit()) {
            $this->setOffset(0);
            return;
        }

        $offset = ($this->getPage() * $this->getLimit()) - $this->getLimit();

        $this->setOffset((int)$offset);
    }
private function calculateOffset ( ) { // When no limit is provided, all items are on one page, so the offset is unreasonable if ( ! $ this -> hasLimit ( ) ) { $ this -> setOffset ( 0 ) ; return ; } $ offset = ( $ this -> getPage ( ) * $ this -> getLimit ( ) ) - $ this -> getLimit ( ) ; $ this -> setOffset ( ( int ) $ offset ) ; }
Calculates the offset for the current page and limit.
Calculates the offset for the current page and limit .