src/Paginator/Paginator.php
public function normalizeItemNumber($itemNumber)
    {
        $itemNumber = (int) $itemNumber;

        if ($itemNumber < 1) {
            $itemNumber = 1;
        }

        if ($itemNumber > $this->getItemCountPerPage()) {
            $itemNumber = $this->getItemCountPerPage();
        }

        return $itemNumber;
    }
public function normalizeItemNumber($itemNumber)
    {
        $itemNumber = (int) $itemNumber;

        if ($itemNumber < 1) {
            $itemNumber = 1;
        }

        if ($itemNumber > $this->getItemCountPerPage()) {
            $itemNumber = $this->getItemCountPerPage();
        }

        return $itemNumber;
    }
public function normalizeItemNumber ( $ itemNumber ) { $ itemNumber = ( int ) $ itemNumber ; if ( $ itemNumber < 1 ) { $ itemNumber = 1 ; } if ( $ itemNumber > $ this -> getItemCountPerPage ( ) ) { $ itemNumber = $ this -> getItemCountPerPage ( ) ; } return $ itemNumber ; }
Brings the item number in range of the page.

@param  int $itemNumber
@return int
Brings the item number in range of the page .