public function asClass(
        $soapResult,
        array $resultClassMap = array(),
        $resultClassNamespace = ''
    ) {
        if (!is_object($soapResult)) {
            throw new InvalidParameterException('Soap Result is not an object');
        }

        $objVarsNames = array_keys(get_object_vars($soapResult));
        $rootClassName = reset($objVarsNames);
        $soapResultObj = $this->mapObject(
            $soapResult->$rootClassName,
            $rootClassName,
            $resultClassMap,
            $resultClassNamespace
        );

        return $soapResultObj;
    }
public function asClass(
        $soapResult,
        array $resultClassMap = array(),
        $resultClassNamespace = ''
    ) {
        if (!is_object($soapResult)) {
            throw new InvalidParameterException('Soap Result is not an object');
        }

        $objVarsNames = array_keys(get_object_vars($soapResult));
        $rootClassName = reset($objVarsNames);
        $soapResultObj = $this->mapObject(
            $soapResult->$rootClassName,
            $rootClassName,
            $resultClassMap,
            $resultClassNamespace
        );

        return $soapResultObj;
    }
public function asClass ( $ soapResult , array $ resultClassMap = array ( ) , $ resultClassNamespace = '' ) { if ( ! is_object ( $ soapResult ) ) { throw new InvalidParameterException ( 'Soap Result is not an object' ) ; } $ objVarsNames = array_keys ( get_object_vars ( $ soapResult ) ) ; $ rootClassName = reset ( $ objVarsNames ) ; $ soapResultObj = $ this -> mapObject ( $ soapResult -> $ rootClassName , $ rootClassName , $ resultClassMap , $ resultClassNamespace ) ; return $ soapResultObj ; }
Maps Result XML Elements to Classes

@param \stdClass $soapResult           SOAP result
@param array     $resultClassMap       Result class map
@param string    $resultClassNamespace Result class namespace

@return mixed
@throws \ITMH\Soap\Exception\InvalidParameterException
@throws \ITMH\Soap\Exception\InvalidClassMappingException
@throws \ITMH\Soap\Exception\MissingClassMappingException
@throws \ReflectionException
Maps Result XML Elements to Classes