You are here

public function Client::__call in Auth0 Single Sign On 8.2

Parameters

string $method:

array $args:

Return value

Promise\PromiseInterface

File

vendor/guzzlehttp/guzzle/src/Client.php, line 84

Class

Client
@method ResponseInterface get(string|UriInterface $uri, array $options = []) @method ResponseInterface head(string|UriInterface $uri, array $options = []) @method ResponseInterface put(string|UriInterface $uri, array $options = []) @method…

Namespace

GuzzleHttp

Code

public function __call($method, $args) {
  if (count($args) < 1) {
    throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
  }
  $uri = $args[0];
  $opts = isset($args[1]) ? $args[1] : [];
  return substr($method, -5) === 'Async' ? $this
    ->requestAsync(substr($method, 0, -5), $uri, $opts) : $this
    ->request($method, $uri, $opts);
}