ScriptFUSION\Porter\Net\Soap\SoapConnector::fetchFreshData PHP Méthode

fetchFreshData() public méthode

public fetchFreshData ( $source, EncapsulatedOptions $options = null )
$options ScriptFUSION\Porter\Options\EncapsulatedOptions
    public function fetchFreshData($source, EncapsulatedOptions $options = null)
    {
        if ($options && !$options instanceof SoapOptions) {
            throw new \InvalidArgumentException('Options must be an instance of SoapOptions.');
        }
        $params = array_merge($this->options->getParameters(), $options ? $options->getParameters() : []);
        return ObjectType::toArray(\ScriptFUSION\Retry\retry(5, function () use($source, $params) {
            return $this->getOrCreateClient()->{$source}($params);
        }, new ExponentialBackoffErrorHandler()));
    }