From 9cec9c65c4f10519df1a55ac1fe4aef790d75eec Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Tue, 13 Sep 2011 21:03:03 +0200 Subject: [PATCH] Moved SoapClient::getTypemap() function in TypeConverterCollection --- src/BeSimple/SoapClient/SoapClient.php | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/BeSimple/SoapClient/SoapClient.php b/src/BeSimple/SoapClient/SoapClient.php index 48a471f..6832ecb 100644 --- a/src/BeSimple/SoapClient/SoapClient.php +++ b/src/BeSimple/SoapClient/SoapClient.php @@ -173,25 +173,10 @@ class SoapClient */ protected function getTypemap() { - $typemap = array(); - if (!$this->converters) { - return $typemap; + return array(); } - foreach ($this->converters->all() as $typeConverter) { - $typemap[] = array( - 'type_name' => $typeConverter->getTypeName(), - 'type_ns' => $typeConverter->getTypeNamespace(), - 'from_xml' => function($input) use ($typeConverter) { - return $typeConverter->convertXmlToPhp($input); - }, - 'to_xml' => function($input) use ($typeConverter) { - return $typeConverter->convertPhpToXml($input); - }, - ); - } - - return $typemap; + return $this->converters->getTypemap(); } } \ No newline at end of file