1 | <?php |
||
10 | class Builder |
||
11 | { |
||
12 | /** |
||
13 | * WP_Query instance |
||
14 | * @var WP_Query |
||
15 | */ |
||
16 | protected $query; |
||
17 | |||
18 | /** |
||
19 | * Post Model instance |
||
20 | * @var Model |
||
21 | */ |
||
22 | protected $model; |
||
23 | |||
24 | /** |
||
25 | * Builder constructor. |
||
26 | * |
||
27 | * @param WP_Query $query |
||
28 | */ |
||
29 | public function __construct(WP_Query $query) |
||
33 | |||
34 | /** |
||
35 | * Limit the number of returned results |
||
36 | * |
||
37 | * @param integer $limit The maximum number of results to return |
||
38 | * use -1 for no limit |
||
39 | * |
||
40 | * @return $this |
||
41 | */ |
||
42 | public function limit($limit) |
||
48 | |||
49 | /** |
||
50 | * [order description] |
||
51 | * @param [type] $order [description] |
||
|
|||
52 | * @return [type] [description] |
||
53 | */ |
||
54 | public function order($order) |
||
60 | |||
61 | /** |
||
62 | * Query by post status |
||
63 | * |
||
64 | * @param string|array $status the post status or stati to match |
||
65 | * |
||
66 | * @return $this |
||
67 | */ |
||
68 | public function whereStatus($status) |
||
74 | |||
75 | /** |
||
76 | * Get the results as a collection of post model instances |
||
77 | * |
||
78 | * @return Collection |
||
79 | */ |
||
80 | public function results() |
||
94 | |||
95 | /** |
||
96 | * Set a query variable on the query |
||
97 | * |
||
98 | * @param [type] $var [description] |
||
99 | * @param [type] $value [description] |
||
100 | * |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function set($var, $value) |
||
109 | |||
110 | /** |
||
111 | * Set the model for this query. |
||
112 | * |
||
113 | * @param Model $model |
||
114 | * |
||
115 | * @return $this |
||
116 | */ |
||
117 | public function setModel(Model $model) |
||
123 | |||
124 | /** |
||
125 | * Get the model |
||
126 | * |
||
127 | * @return Model |
||
128 | */ |
||
129 | public function getModel() |
||
133 | |||
134 | } |
||
135 |
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.