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;
    }