| @@ -44,9 +44,18 @@ | ||
| 44 | 44 | * @var int |
| 45 | 45 | */ |
| 46 | 46 | protected $logs_wp_options; |
| 47 | 47 | |
| 48 | + | |
| 48 | 49 | /** |
| 50 | + * Hold logs extra data. | |
| 51 | + * | |
| 52 | + * @var int | |
| 53 | + */ | |
| 54 | + protected $logs_extra_data = array(); | |
| 55 | + | |
| 56 | + | |
| 57 | + /** | |
| 49 | 58 | * Constructor. |
| 50 | 59 | * |
| 51 | 60 | * Run each time the class is called. |
| 52 | 61 | * |
| @@ -193,8 +202,9 @@ | ||
| 193 | 202 | |
| 194 | 203 | $result = (array) $this->driver->get_records( $args ); |
| 195 | 204 | $this->found_records_count = isset( $result['count'] ) ? $result['count'] : 0; |
| 196 | 205 | $this->logs_wp_options = isset( $result['sites_opts'] ) && is_array( $result['sites_opts'] ) ? $result['sites_opts'] : array(); |
| 206 | + $this->logs_extra_data = isset( $result['extra_data'] ) && is_array( $result['extra_data'] ) ? $result['extra_data'] : array(); | |
| 197 | 207 | |
| 198 | 208 | return empty( $result['items'] ) ? array() : $result['items']; |
| 199 | 209 | } |
| 200 | 210 | |
| @@ -224,8 +234,17 @@ | ||
| 224 | 234 | * @return int |
| 225 | 235 | */ |
| 226 | 236 | public function get_logs_sites_opts() { |
| 227 | 237 | return $this->logs_wp_options; |
| 238 | + } | |
| 239 | + | |
| 240 | + /** | |
| 241 | + * Return the number of records found in last request | |
| 242 | + * | |
| 243 | + * @return int | |
| 244 | + */ | |
| 245 | + public function get_logs_extra_data() { | |
| 246 | + return $this->logs_extra_data; | |
| 228 | 247 | } |
| 229 | 248 | |
| 230 | 249 | /** |
| 231 | 250 | * Public getter to return table names |