seregazhuk\PinterestBot\Api\Providers\ProviderWrapper::__call PHP Method

__call() public method

Proxies a call to a provider with a login check before every method if needed.
public __call ( $method, $arguments ) : mixed | null
$method
$arguments
return mixed | null
    public function __call($method, $arguments)
    {
        if (method_exists($this->provider, $method)) {
            $this->checkMethodForLoginRequired($method);
            return call_user_func_array([$this->provider, $method], $arguments);
        }
        $errorMessage = $this->getErrorMethodCallMessage($method, "Method {$method} does'n exist.");
        throw new InvalidRequest($errorMessage);
    }