| 1 | <?php |
||
| 9 | class Builder |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * WP_Query instance |
||
| 13 | * @var \WP_Query |
||
| 14 | */ |
||
| 15 | protected $query; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Post Model instance |
||
| 19 | * @var \Silk\Models\Post |
||
| 20 | */ |
||
| 21 | protected $model; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Builder constructor. |
||
| 25 | * |
||
| 26 | * @param WP_Query $query |
||
| 27 | */ |
||
| 28 | public function __construct(WP_Query $query) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Limit the number of returned results |
||
| 35 | * |
||
| 36 | * @param integer $limit The maximum number of results to return |
||
| 37 | * use -1 for no limit |
||
| 38 | * |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | public function limit($limit) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * [order description] |
||
| 50 | * @param [type] $order [description] |
||
|
|
|||
| 51 | * @return [type] [description] |
||
| 52 | */ |
||
| 53 | public function order($order) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Get the results as a collection of post model instances |
||
| 62 | * |
||
| 63 | * @return Collection |
||
| 64 | */ |
||
| 65 | public function results() |
||
| 79 | |||
| 80 | /** |
||
| 81 | * Set the model for this query. |
||
| 82 | * |
||
| 83 | * @param Post $model |
||
| 84 | * |
||
| 85 | * @return $this |
||
| 86 | */ |
||
| 87 | public function setModel(Post $model) |
||
| 93 | |||
| 94 | /** |
||
| 95 | * Get the model |
||
| 96 | * |
||
| 97 | * @return Post |
||
| 98 | */ |
||
| 99 | public function getModel() |
||
| 103 | |||
| 104 | } |
||
| 105 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.