@@ 181-198 (lines=18) @@ | ||
178 | * |
|
179 | * @return Auth\Group|Auth\User|false The merged returnValue |
|
180 | */ |
|
181 | private function callOnEach($functionName, $args, $checkField = false, $checkValue = false) |
|
182 | { |
|
183 | $ret = false; |
|
184 | $count = count($this->methods); |
|
185 | for($i = 0; $i < $count; $i++) |
|
186 | { |
|
187 | if($checkField) |
|
188 | { |
|
189 | if($this->methods[$i]->{$checkField} === $checkValue) |
|
190 | { |
|
191 | continue; |
|
192 | } |
|
193 | } |
|
194 | $res = call_user_func_array(array($this->methods[$i], $functionName), $args); |
|
195 | $this->mergeResult($ret, $res); |
|
196 | } |
|
197 | return $ret; |
|
198 | } |
|
199 | ||
200 | /** |
|
201 | * Calls the indicated function on each Authenticator and add the result |
|
@@ 209-226 (lines=18) @@ | ||
206 | * |
|
207 | * @return integer|false The added returnValue |
|
208 | */ |
|
209 | private function addFromEach($functionName, $checkField = false, $checkValue = false) |
|
210 | { |
|
211 | $retCount = 0; |
|
212 | $count = count($this->methods); |
|
213 | for($i = 0; $i < $count; $i++) |
|
214 | { |
|
215 | if($checkField) |
|
216 | { |
|
217 | if($this->methods[$i]->{$checkField} === $checkValue) |
|
218 | { |
|
219 | continue; |
|
220 | } |
|
221 | } |
|
222 | $res = call_user_func(array($this->methods[$i], $functionName)); |
|
223 | $retCount += $res; |
|
224 | } |
|
225 | return $retCount; |
|
226 | } |
|
227 | ||
228 | /** |
|
229 | * Get an Auth\Group by its name |