1 | <?php namespace Syntax\SteamApi; |
||
3 | class Collection extends \Illuminate\Database\Eloquent\Collection { |
||
4 | |||
5 | /** |
||
6 | * Dynamically retrieve attributes on the model. |
||
7 | * |
||
8 | * @param string $key |
||
9 | * |
||
10 | * @return Collection |
||
11 | */ |
||
12 | public function __get($key) |
||
31 | |||
32 | /** |
||
33 | * Allow a method to be run on the enitre collection. |
||
34 | * |
||
35 | * @param string $method |
||
36 | * @param array $args |
||
37 | * |
||
38 | * @return Collection |
||
39 | */ |
||
40 | public function __call($method, $args) |
||
55 | |||
56 | /** |
||
57 | * Insert into an object |
||
58 | * |
||
59 | * @param mixed $value |
||
60 | * @param int $afterKey |
||
61 | * |
||
62 | * @return Collection |
||
63 | */ |
||
64 | public function insertAfter($value, $afterKey) |
||
80 | |||
81 | /** |
||
82 | * Find item in a collection |
||
83 | * |
||
84 | * @param string $column |
||
85 | * @param string|null $value |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | public function where($column, $value = null) |
||
106 | |||
107 | /** |
||
108 | * @param $key |
||
109 | * @param $item |
||
110 | * @param $column |
||
111 | * @param $value |
||
112 | * |
||
113 | * @return bool |
||
114 | */ |
||
115 | private function handleMultiTap($key, $item, $column, $value) |
||
129 | |||
130 | /** |
||
131 | * @param $key |
||
132 | * @param $item |
||
133 | * @param $column |
||
134 | * @param $value |
||
135 | * |
||
136 | * @return bool |
||
137 | */ |
||
138 | private function handleSingle($key, $item, $column, $value) |
||
151 | |||
152 | /** |
||
153 | * @param $column |
||
154 | * @param $item |
||
155 | * |
||
156 | * @return mixed |
||
157 | */ |
||
158 | private function tapThroughObjects($column, $item) |
||
171 | |||
172 | /** |
||
173 | * @param $key |
||
174 | * @param $value |
||
175 | * @param $objectToSearch |
||
176 | * |
||
177 | * @return bool |
||
178 | */ |
||
179 | private function removeCollectionItem($key, $value, $objectToSearch) |
||
190 | |||
191 | /** |
||
192 | * @param $key |
||
193 | * @param $value |
||
194 | * @param $objectToSearch |
||
195 | * |
||
196 | * @return bool |
||
197 | */ |
||
198 | private function removeItem($key, $value, $objectToSearch) |
||
207 | } |