Good day! There is a large OOP class: $db .
It has a function:
public function paginate ($table, $page, $fields = null){ $offset = $this->pageLimit * ($page - 1); $res = $this->withTotalCount()->get ($table, Array ($offset, $this->pageLimit), $fields); $this->totalPages = ceil($this->totalCount / $this->pageLimit); return $res; } - I get the value from this function
$clients=$db->paginate('clients', 1); - But at the same time it is necessary in parallel to pull out the value of
totalPagesfrom it. How to do it?