diff --git a/src/BeSimple/SoapBundle/Soap/SoapClientBuilder.php b/src/BeSimple/SoapBundle/Soap/SoapClientBuilder.php deleted file mode 100644 index 977b92b..0000000 --- a/src/BeSimple/SoapBundle/Soap/SoapClientBuilder.php +++ /dev/null @@ -1,77 +0,0 @@ -checkOptions($options); - - $this - ->withWsdl($wsdl) - ->withTrace($options['debug']) - ; - - if (isset($options['user_agent'])) { - $this->withUserAgent($options['user_agent']); - } - - if (isset($options['cache_type'])) { - $this->withWsdlCache($options['cache_type']); - } - - if ($classmap) { - $this->withClassmap($classmap); - } - - if ($converters) { - $this->withTypeConverters($converters); - } - } - - public function build() - { - if (!$this->soapClient) { - $this->soapClient = parent::build(); - } - - return $this->soapClient; - } - - protected function checkOptions(array $options) - { - $checkOptions = array( - 'debug' => false, - 'cache_type' => null, - 'exceptions' => true, - 'user_agent' => 'BeSimpleSoap', - ); - - // check option names and live merge, if errors are encountered Exception will be thrown - $invalid = array(); - $isInvalid = false; - foreach ($options as $key => $value) { - if (!array_key_exists($key, $checkOptions)) { - $isInvalid = true; - $invalid[] = $key; - } - } - - if ($isInvalid) { - throw new \InvalidArgumentException(sprintf( - 'The "%s" class does not support the following options: "%s".', - get_class($this), - implode('\', \'', $invalid) - )); - } - } -}