Pagination object oriented
If you have to identify the main objects here, we could conclude that you have at least 3

-- The connection to the DataBase

-- The pagination object that knows how to paginate a query

-- The query it self

so ie this is a possible solution:
    

abstract class DBConnection{
    //Logic 
    public function executeQuery(Query $query)
    {
        $sql = $query-&gt;getSql();

        //Logic and return results
    }
}

class Query{
    private $sql;
    private $limit;
    private $offset;

    //getters and setters for each private property ... getSql ... setSql ...

    public function __construct($sql)
    {
        $this-&gt;sql = $sql;
    }

    public function getSql()
    {
        return $this-&gt;sql += "offset $this-&gt;getOffset() limit $this-&gt;getLimit()";
    }
}

class Paginator
{
    private $currentPage;
    private $perPage;
    private $query;
    private $connection;

    //Getters and setters...

    public function __construct(Query $query, $currentPage = 0, $perPage = 10)
    {
        $this-&gt;query = $query;
        $this-&gt;connection = new DBConnection();
    }

    public function nextPage()
    {
        $this-&gt;currentPage++;
    }

    public function prevPage()
    {
        $this-&gt;currentPage--; //check if 0 not substract
    }

    public function execute()
    {
        $this-&gt;query-&gt;setOffset($this-&gt;currentPage * $this-&gt;perPage);
        $this-&gt;query-&gt;setLimit($this-&gt;perPage);
        return $this-&gt;connection-&gt;executeQuery($this-&gt;query);
    }
}