1 | <?php |
||
9 | class QueryBuilder extends BaseBuilder |
||
10 | { |
||
11 | /** |
||
12 | * Query arguments |
||
13 | * @var Collection |
||
14 | */ |
||
15 | protected $query; |
||
16 | |||
17 | /** |
||
18 | * Taxonomy Identifier |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $taxonomy; |
||
22 | |||
23 | /** |
||
24 | * QueryBuilder Constructor. |
||
25 | * |
||
26 | * @param array $args |
||
27 | */ |
||
28 | public function __construct(array $args = []) |
||
32 | |||
33 | /** |
||
34 | * Create a new instance. |
||
35 | * |
||
36 | * @return static |
||
37 | */ |
||
38 | public static function make() |
||
42 | |||
43 | /** |
||
44 | * Restrict the query to terms of the provided Taxonomy. |
||
45 | * |
||
46 | * @param string $taxonomy |
||
47 | * |
||
48 | * @return $this |
||
49 | */ |
||
50 | public function forTaxonomy($taxonomy) |
||
56 | |||
57 | /** |
||
58 | * Get all terms. |
||
59 | * |
||
60 | * @return $this |
||
61 | */ |
||
62 | public function all() |
||
67 | |||
68 | /** |
||
69 | * Include terms that have no related objects in the results. |
||
70 | * |
||
71 | * @return $this |
||
72 | */ |
||
73 | public function includeEmpty() |
||
77 | |||
78 | /** |
||
79 | * Limit the maximum number of results returned. |
||
80 | * |
||
81 | * @param int $max_results Maximum number to return. 0 or 'all' for unlimited. |
||
82 | * |
||
83 | * @return $this |
||
84 | */ |
||
85 | public function limit($max_results) |
||
89 | |||
90 | /** |
||
91 | * Execute the query and return the raw results. |
||
92 | * |
||
93 | * @throws WP_ErrorException |
||
94 | * |
||
95 | * @return array |
||
96 | */ |
||
97 | protected function query() |
||
112 | |||
113 | /** |
||
114 | * Set an arbitrary query parameter. |
||
115 | * |
||
116 | * @param $parameter |
||
117 | * @param $value |
||
118 | * |
||
119 | * @return $this |
||
120 | */ |
||
121 | public function set($parameter, $value) |
||
127 | } |
||
128 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.