public static function init($namespace, $total, $start = 'start', $limit = 'limit')
	{
		$instance = new self;

		$instance->total = $total;
		$instance->start = \Request::getInt(
			$start,
			\User::getState($namespace . '.start', 0)
		);
		$instance->limit = \Request::getInt(
			$limit,
			\User::getState($namespace . '.limit', \Config::get('list_limit'))
		);

		$instance->start = ($instance->limit != 0 ? (floor($instance->start / $instance->limit) * $instance->limit) : 0);

		\User::setState($namespace . '.start', $instance->start);
		\User::setState($namespace . '.limit', $instance->limit);

		return $instance;
	}
public static function init($namespace, $total, $start = 'start', $limit = 'limit')
	{
		$instance = new self;

		$instance->total = $total;
		$instance->start = \Request::getInt(
			$start,
			\User::getState($namespace . '.start', 0)
		);
		$instance->limit = \Request::getInt(
			$limit,
			\User::getState($namespace . '.limit', \Config::get('list_limit'))
		);

		$instance->start = ($instance->limit != 0 ? (floor($instance->start / $instance->limit) * $instance->limit) : 0);

		\User::setState($namespace . '.start', $instance->start);
		\User::setState($namespace . '.limit', $instance->limit);

		return $instance;
	}
public static function init ( $ namespace , $ total , $ start = 'start' , $ limit = 'limit' ) { $ instance = new self ; $ instance -> total = $ total ; $ instance -> start = \ Request :: getInt ( $ start , \ User :: getState ( $ namespace . '.start' , 0 ) ) ; $ instance -> limit = \ Request :: getInt ( $ limit , \ User :: getState ( $ namespace . '.limit' , \ Config :: get ( 'list_limit' ) ) ) ; $ instance -> start = ( $ instance -> limit != 0 ? ( floor ( $ instance -> start / $ instance -> limit ) * $ instance -> limit ) : 0 ) ; \ User :: setState ( $ namespace . '.start' , $ instance -> start ) ; \ User :: setState ( $ namespace . '.limit' , $ instance -> limit ) ; return $ instance ; }
Initializes pagination object

@param   string  $namespace  The session state variable namespace
@param   int     $total      Total number of records
@param   string  $start      The variable name representing the pagination start number
@param   string  $limit      The variable name representing the pagination limit number
@return  object
@since   2.0.0
Initializes pagination object