1 | <?php namespace Arcanedev\LaravelNestedSet\Eloquent; |
||
18 | class AncestorsRelation extends Relation |
||
19 | { |
||
20 | /* ----------------------------------------------------------------- |
||
21 | | Properties |
||
22 | | ----------------------------------------------------------------- |
||
23 | */ |
||
24 | /** |
||
25 | * @var \Arcanedev\LaravelNestedSet\NodeTrait|\Illuminate\Database\Eloquent\Model |
||
26 | */ |
||
27 | protected $parent; |
||
28 | |||
29 | /** |
||
30 | * @var QueryBuilder |
||
31 | */ |
||
32 | protected $query; |
||
33 | |||
34 | /* ----------------------------------------------------------------- |
||
35 | | Constructor |
||
36 | | ----------------------------------------------------------------- |
||
37 | */ |
||
38 | /** |
||
39 | * AncestorsRelation constructor. |
||
40 | * |
||
41 | * @param \Arcanedev\LaravelNestedSet\Eloquent\QueryBuilder $builder |
||
42 | * @param \Illuminate\Database\Eloquent\Model|mixed $model |
||
43 | */ |
||
44 | 3 | public function __construct(QueryBuilder $builder, Model $model) |
|
51 | |||
52 | /** |
||
53 | * Add the constraints for a relationship count query. |
||
54 | * |
||
55 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
56 | * @param \Illuminate\Database\Eloquent\Builder $parentQuery |
||
57 | * |
||
58 | * @return \Illuminate\Database\Eloquent\Builder |
||
59 | */ |
||
60 | public function getRelationExistenceCountQuery(EloquentBuilder $query, EloquentBuilder $parentQuery) |
||
64 | |||
65 | /** |
||
66 | * Add the constraints for an internal relationship existence query. |
||
67 | * |
||
68 | * Essentially, these queries compare on column names like whereColumn. |
||
69 | * |
||
70 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
71 | * @param \Illuminate\Database\Eloquent\Builder $parentQuery |
||
72 | * @param array|mixed $columns |
||
73 | * |
||
74 | * @return \Illuminate\Database\Eloquent\Builder |
||
75 | */ |
||
76 | public function getRelationExistenceQuery(EloquentBuilder $query, EloquentBuilder $parentQuery, $columns = [ '*' ]) |
||
92 | |||
93 | /** |
||
94 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
95 | * @param \Illuminate\Database\Eloquent\Builder $parentQuery |
||
96 | * @param array|mixed $columns |
||
97 | * |
||
98 | * @return mixed |
||
99 | */ |
||
100 | public function getRelationQuery(EloquentBuilder $query, EloquentBuilder $parentQuery, $columns = [ '*' ]) |
||
104 | |||
105 | /** |
||
106 | * Get a relationship join table hash. |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getRelationSubSelectHash() |
||
114 | |||
115 | /** |
||
116 | * Set the base constraints on the relation query. |
||
117 | */ |
||
118 | 3 | public function addConstraints() |
|
124 | |||
125 | /** |
||
126 | * Set the constraints for an eager load of the relation. |
||
127 | * |
||
128 | * @param array $models |
||
129 | */ |
||
130 | public function addEagerConstraints(array $models) |
||
153 | |||
154 | /** |
||
155 | * Initialize the relation on a set of models. |
||
156 | * |
||
157 | * @param array $models |
||
158 | * @param string $relation |
||
159 | * |
||
160 | * @return array |
||
161 | */ |
||
162 | public function initRelation(array $models, $relation) |
||
166 | |||
167 | /** |
||
168 | * Match the eagerly loaded results to their parents. |
||
169 | * |
||
170 | * @param array $models |
||
171 | * @param \Illuminate\Database\Eloquent\Collection $results |
||
172 | * @param string $relation |
||
173 | * |
||
174 | * @return array |
||
175 | */ |
||
176 | public function match(array $models, EloquentCollection $results, $relation) |
||
184 | |||
185 | /** |
||
186 | * Get the results of the relationship. |
||
187 | * |
||
188 | * @return mixed |
||
189 | */ |
||
190 | public function getResults() |
||
194 | |||
195 | /** |
||
196 | * Get ancestors for the given model. |
||
197 | * |
||
198 | * @param \Illuminate\Database\Eloquent\Model $model |
||
199 | * @param \Illuminate\Database\Eloquent\Collection $results |
||
200 | * |
||
201 | * @return \Illuminate\Database\Eloquent\Collection |
||
202 | */ |
||
203 | protected function getAncestorsForModel(Model $model, EloquentCollection $results) |
||
214 | } |
||
215 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.