public static function __callStatic($method, $arguments) { $hlrLookup = new HlrLookup(); switch ($method) { case "apiKey": return $hlrLookup->setApiKey($arguments[0]); break; case "password": return $hlrLookup->setPassword($arguments[0]); break; case "number": return $hlrLookup->check($arguments[0]); break; case "numbers": if (!is_array($arguments[0])) { throw new \InvalidArgumentException('Argument should be of type Array'); } return $hlrLookup->check($arguments[0]); break; default: throw new \BadMethodCallException("No static Method {$method} is available."); break; } }
public function testNumber() { $hlrLookup = new HlrLookup('asd', 'asd'); $response = $hlrLookup->number('07949834768'); var_dump($response->isActive()); }