From 374c64538a31547bc41709c79f4b032ec391b471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Bechyn=C4=9B?= Date: Mon, 31 Oct 2016 14:12:35 +0100 Subject: [PATCH] remove useless SoapClientBuilder --- .../SoapBundle/Soap/SoapClientBuilder.php | 77 ------------------- 1 file changed, 77 deletions(-) delete mode 100644 src/BeSimple/SoapBundle/Soap/SoapClientBuilder.php 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) - )); - } - } -}