per_page; } /** * @return int */ public function get_current_page() { return $this->current_page; } /** * @return int */ public function get_pages() { $n = 0; if ( $this->count > 0 && $this->per_page > 0 ) { $n = ceil( $this->count / $this->per_page ); } return $n; } /** * Provides the total number of entries available. * * @return int */ public function get_count() { return $this->count; } /** * Filter by from date. * * @return string */ public function get_from_date() { return $this->from_date; } /** * Filter by thru date. * * @return string */ public function get_thru_date() { return $this->thru_date; } /** * @return int */ public function get_sort_order() { return $this->sort_order; } /** * @return string */ public function get_switch_sort_order() { return $this->switch_sort_order; } /** * @return string */ public function get_orderby() { return $this->orderby; } /** * @return array column keys mapped to translated column heading labels and descriptions */ public function get_columns() { return $this->columns; } /** * Provides the entries to display for the current page. * * @return array of entries */ public function get_entries() { $result = array(); if ( $this->entries !== null && is_array( $this->entries ) ) { $result = $this->entries; } return $result; } }