protected function mapArray($data, $className, $classMap, $classNamespace = '')
    {
        // If array mapping exists, map array elements.
        $className = 'array|' . $className;
        if (!array_key_exists($className, $classMap)) {
            return $data;
        }

        $returnArray = [];
        foreach ($data as $key => $val) {
            $returnArray[$key] = $this->mapObject($val, $className, $classMap, $classNamespace);
        }

        return $returnArray;
    }
protected function mapArray($data, $className, $classMap, $classNamespace = '')
    {
        // If array mapping exists, map array elements.
        $className = 'array|' . $className;
        if (!array_key_exists($className, $classMap)) {
            return $data;
        }

        $returnArray = [];
        foreach ($data as $key => $val) {
            $returnArray[$key] = $this->mapObject($val, $className, $classMap, $classNamespace);
        }

        return $returnArray;
    }
protected function mapArray ( $ data , $ className , $ classMap , $ classNamespace = '' ) { // If array mapping exists, map array elements. $ className = 'array|' . $ className ; if ( ! array_key_exists ( $ className , $ classMap ) ) { return $ data ; } $ returnArray = [ ] ; foreach ( $ data as $ key => $ val ) { $ returnArray [ $ key ] = $ this -> mapObject ( $ val , $ className , $ classMap , $ classNamespace ) ; } return $ returnArray ; }
Map Remote SOAP response to local classes if response is array

@param mixed  $data           Remote SOAP Object
@param string $className      Root (or current) class name
@param array  $classMap       Class Mapping
@param string $classNamespace Namespace where the local classes are located

@return array
@throws \ITMH\Soap\Exception\InvalidClassMappingException
@throws \ITMH\Soap\Exception\MissingClassMappingException
@throws \ReflectionException
Map Remote SOAP response to local classes if response is array