| Conditions | 5 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 7 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public static function __callStatic($method, $params) |
||
| 17 | { |
||
| 18 | // alias for Auth's init and persist methods |
||
| 19 | if ($method == 'init' || $method == 'persist') { |
||
| 20 | return call_user_func_array([ new Auth, $method ], $params); |
||
| 21 | } |
||
| 22 | |||
| 23 | // standard Auth |
||
| 24 | if ($method == 'auth') { |
||
| 25 | return new Auth; |
||
| 26 | } |
||
| 27 | |||
| 28 | // all other subsystems, currently Betting and Account |
||
| 29 | $class = 'PeterColes\\Betfair\\Api\\'.ucfirst($method); |
||
| 30 | if (class_exists($class)) { |
||
| 31 | return call_user_func([ new $class, 'execute' ], $params); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | } |
||
| 35 |