code/libraries/joomlatools/library/model/paginator/paginator.php
public function set($name, $value)
    {
        parent::set($name, $value);
        
        //Only calculate the limit and offset if we have a total
        if($this->total)
        {
            $this->limit  = (int) max($this->limit, 1);
            $this->offset = (int) max($this->offset, 0);
        
            if($this->limit > $this->total) {
                $this->offset = 0;
            }
           
            if(!$this->limit) 
            {
                $this->offset = 0;
                $this->limit  = $this->total;
            }

            $this->count  = (int) ceil($this->total / $this->limit);

            if($this->offset > $this->total) {
                $this->offset = ($this->count-1) * $this->limit;
            }

            $this->current = (int) floor($this->offset / $this->limit) + 1;
        }
    }
public function set($name, $value)
    {
        parent::set($name, $value);
        
        //Only calculate the limit and offset if we have a total
        if($this->total)
        {
            $this->limit  = (int) max($this->limit, 1);
            $this->offset = (int) max($this->offset, 0);
        
            if($this->limit > $this->total) {
                $this->offset = 0;
            }
           
            if(!$this->limit) 
            {
                $this->offset = 0;
                $this->limit  = $this->total;
            }

            $this->count  = (int) ceil($this->total / $this->limit);

            if($this->offset > $this->total) {
                $this->offset = ($this->count-1) * $this->limit;
            }

            $this->current = (int) floor($this->offset / $this->limit) + 1;
        }
    }
public function set ( $ name , $ value ) { parent :: set ( $ name , $ value ) ; //Only calculate the limit and offset if we have a total if ( $ this -> total ) { $ this -> limit = ( int ) max ( $ this -> limit , 1 ) ; $ this -> offset = ( int ) max ( $ this -> offset , 0 ) ; if ( $ this -> limit > $ this -> total ) { $ this -> offset = 0 ; } if ( ! $ this -> limit ) { $ this -> offset = 0 ; $ this -> limit = $ this -> total ; } $ this -> count = ( int ) ceil ( $ this -> total / $ this -> limit ) ; if ( $ this -> offset > $ this -> total ) { $ this -> offset = ( $ this -> count - 1 ) * $ this -> limit ; } $ this -> current = ( int ) floor ( $ this -> offset / $ this -> limit ) + 1 ; } }
Set a configuration element

@param  string
@param  mixed
@return void
Set a configuration element