| 1 |
<?php |
| 2 |
/** |
| 3 |
* Friend User Query Result |
| 4 |
* |
| 5 |
* Simple result container for filtered subscription queries. |
| 6 |
* Avoids creating a WP_User_Query which would load all WP users. |
| 7 |
* |
| 8 |
* @package Friends |
| 9 |
*/ |
| 10 |
|
| 11 |
namespace Friends; |
| 12 |
|
| 13 |
/** |
| 14 |
* This is a simple result container for filtered subscription queries. |
| 15 |
* |
| 16 |
* @since 4.0 |
| 17 |
* |
| 18 |
* @package Friends |
| 19 |
* @author Alex Kirk |
| 20 |
*/ |
| 21 |
class User_Query_Result { |
| 22 |
/** |
| 23 |
* The results. |
| 24 |
* |
| 25 |
* @var array |
| 26 |
*/ |
| 27 |
private $results; |
| 28 |
|
| 29 |
/** |
| 30 |
* The total count. |
| 31 |
* |
| 32 |
* @var int |
| 33 |
*/ |
| 34 |
private $total; |
| 35 |
|
| 36 |
/** |
| 37 |
* Constructor. |
| 38 |
* |
| 39 |
* @param array $results The results. |
| 40 |
* @param int $total The total count. |
| 41 |
*/ |
| 42 |
public function __construct( $results, $total ) { |
| 43 |
$this->results = $results; |
| 44 |
$this->total = $total; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* Get results. |
| 49 |
* |
| 50 |
* @return array |
| 51 |
*/ |
| 52 |
public function get_results() { |
| 53 |
return $this->results; |
| 54 |
} |
| 55 |
|
| 56 |
/** |
| 57 |
* Get total. |
| 58 |
* |
| 59 |
* @return int |
| 60 |
*/ |
| 61 |
public function get_total() { |
| 62 |
return $this->total; |
| 63 |
} |
| 64 |
} |
| 65 |
|