private function setTotalItems($totalItems)
    {
        if (! is_int($totalItems)) {
            throw new Exceptions\InvalidIntegerType(gettype($totalItems));
        }

        // A result may have zero or more items
        if ($totalItems < 0) {
            throw new Exceptions\PositiveIntegerRequired($totalItems);
        }

        $this->totalItems = $totalItems;

        $this->changedTotalItems();
    }
private function setTotalItems($totalItems)
    {
        if (! is_int($totalItems)) {
            throw new Exceptions\InvalidIntegerType(gettype($totalItems));
        }

        // A result may have zero or more items
        if ($totalItems < 0) {
            throw new Exceptions\PositiveIntegerRequired($totalItems);
        }

        $this->totalItems = $totalItems;

        $this->changedTotalItems();
    }
private function setTotalItems ( $ totalItems ) { if ( ! is_int ( $ totalItems ) ) { throw new Exceptions \ InvalidIntegerType ( gettype ( $ totalItems ) ) ; } // A result may have zero or more items if ( $ totalItems < 0 ) { throw new Exceptions \ PositiveIntegerRequired ( $ totalItems ) ; } $ this -> totalItems = $ totalItems ; $ this -> changedTotalItems ( ) ; }
Stores the total amount of items.
@param int $totalItems
@throws Exceptions\InvalidIntegerType
@throws Exceptions\PositiveIntegerRequired
Stores the total amount of items .