Pop\Paginator\Paginator::setTotal PHP Method

setTotal() public method

Method to set the content items total
public setTotal ( integer $total = null ) : Paginator
$total integer
return Paginator
    public function setTotal($total = null)
    {
        $this->total = null !== $total ? (int) $total : null;
        return $this;
    }

Usage Example

Example #1
0
 public function testSetAndGetTotal()
 {
     $p = new Paginator(array());
     $p->setTotal(100);
     $this->assertEquals(100, $p->getTotal());
 }