protected function parse_pagination() {

		if ( $this->args['items_per_page'] == - 1 ) {
			return null;
		}

		if ( $this->args['page'] < 1 ) {
			throw new \InvalidArgumentException( "page parameter must be at least 1." );
		}

		$per_page = absint( $this->args['items_per_page'] );
		$page     = absint( $this->args['page'] );

		$count  = $per_page;
		$offset = $per_page * ( $page - 1 );

		return new Limit( $count, $offset );
	}
protected function parse_pagination() {

		if ( $this->args['items_per_page'] == - 1 ) {
			return null;
		}

		if ( $this->args['page'] < 1 ) {
			throw new \InvalidArgumentException( "page parameter must be at least 1." );
		}

		$per_page = absint( $this->args['items_per_page'] );
		$page     = absint( $this->args['page'] );

		$count  = $per_page;
		$offset = $per_page * ( $page - 1 );

		return new Limit( $count, $offset );
	}
protected function parse_pagination ( ) { if ( $ this -> args [ 'items_per_page' ] == - 1 ) { return null ; } if ( $ this -> args [ 'page' ] < 1 ) { throw new \ InvalidArgumentException ( "page parameter must be at least 1." ) ; } $ per_page = absint ( $ this -> args [ 'items_per_page' ] ) ; $ page = absint ( $ this -> args [ 'page' ] ) ; $ count = $ per_page ; $ offset = $ per_page * ( $ page - 1 ) ; return new Limit ( $ count , $ offset ) ; }
Parse the pagination query.

@since 1.0

@return Limit|null
Parse the pagination query .