protected function mapArray(array $arrayValues = null)
    {
        if ($arrayValues === null) {
            return [];
        }

        $array = [];
        foreach ($arrayValues as $arrayValue) {
            if ($arrayValue['value'] === null) {
                $array[$arrayValue['index']] = null;
            } else {
                switch ($arrayValue['type']) {
                    case 'integer':
                        $array[$arrayValue['index']] = (int) $arrayValue['value'];
                    break;
                    case 'float':
                        $array[$arrayValue['index']] = (float) $arrayValue['value'];
                    break;
                    case 'boolean':
                        $array[$arrayValue['index']] = (boolean) $arrayValue['value'];
                    break;
                    case 'string':
                        $array[$arrayValue['index']] = (string) $arrayValue['value'];
                    break;
                    case 'DateTime':
                        $array[$arrayValue['index']] = $this->mapDateTime($arrayValue['value']);
                    break;
                    case 'array':
                        $array[$arrayValue['index']] = $this->mapArray($arrayValue['value']);
                    break;
                    case 'SplObjectStorage':
                        $array[$arrayValue['index']] = $this->mapSplObjectStorage($arrayValue['value']);
                    break;
                    default:
                        $array[$arrayValue['index']] = $this->mapToObject($arrayValue['value']);
                    break;
                }
            }
        }

        return $array;
    }
protected function mapArray(array $arrayValues = null)
    {
        if ($arrayValues === null) {
            return [];
        }

        $array = [];
        foreach ($arrayValues as $arrayValue) {
            if ($arrayValue['value'] === null) {
                $array[$arrayValue['index']] = null;
            } else {
                switch ($arrayValue['type']) {
                    case 'integer':
                        $array[$arrayValue['index']] = (int) $arrayValue['value'];
                    break;
                    case 'float':
                        $array[$arrayValue['index']] = (float) $arrayValue['value'];
                    break;
                    case 'boolean':
                        $array[$arrayValue['index']] = (boolean) $arrayValue['value'];
                    break;
                    case 'string':
                        $array[$arrayValue['index']] = (string) $arrayValue['value'];
                    break;
                    case 'DateTime':
                        $array[$arrayValue['index']] = $this->mapDateTime($arrayValue['value']);
                    break;
                    case 'array':
                        $array[$arrayValue['index']] = $this->mapArray($arrayValue['value']);
                    break;
                    case 'SplObjectStorage':
                        $array[$arrayValue['index']] = $this->mapSplObjectStorage($arrayValue['value']);
                    break;
                    default:
                        $array[$arrayValue['index']] = $this->mapToObject($arrayValue['value']);
                    break;
                }
            }
        }

        return $array;
    }
protected function mapArray ( array $ arrayValues = null ) { if ( $ arrayValues === null ) { return [ ] ; } $ array = [ ] ; foreach ( $ arrayValues as $ arrayValue ) { if ( $ arrayValue [ 'value' ] === null ) { $ array [ $ arrayValue [ 'index' ] ] = null ; } else { switch ( $ arrayValue [ 'type' ] ) { case 'integer' : $ array [ $ arrayValue [ 'index' ] ] = ( int ) $ arrayValue [ 'value' ] ; break ; case 'float' : $ array [ $ arrayValue [ 'index' ] ] = ( float ) $ arrayValue [ 'value' ] ; break ; case 'boolean' : $ array [ $ arrayValue [ 'index' ] ] = ( boolean ) $ arrayValue [ 'value' ] ; break ; case 'string' : $ array [ $ arrayValue [ 'index' ] ] = ( string ) $ arrayValue [ 'value' ] ; break ; case 'DateTime' : $ array [ $ arrayValue [ 'index' ] ] = $ this -> mapDateTime ( $ arrayValue [ 'value' ] ) ; break ; case 'array' : $ array [ $ arrayValue [ 'index' ] ] = $ this -> mapArray ( $ arrayValue [ 'value' ] ) ; break ; case 'SplObjectStorage' : $ array [ $ arrayValue [ 'index' ] ] = $ this -> mapSplObjectStorage ( $ arrayValue [ 'value' ] ) ; break ; default : $ array [ $ arrayValue [ 'index' ] ] = $ this -> mapToObject ( $ arrayValue [ 'value' ] ) ; break ; } } } return $ array ; }
Maps an array proxy structure back to a native PHP array

@param array $arrayValues
@return array
Maps an array proxy structure back to a native PHP array