protected function buildArrayFromMappingCollection(MappingCollection $mappingCollection)
    {
        $return = [];

        /** @var $mappingInformation Mapping */
        foreach ($mappingCollection as $mappingInformation) {
            $indexName = $mappingInformation->getType()->getIndex()->getName();
            $typeName = $mappingInformation->getType()->getName();
            if (isset($return[$indexName][$typeName])) {
                throw new ElasticSearchException('There was more than one mapping present in index %s with type %s, which must not happen.', 1339758480);
            }

            $return[$indexName][$typeName]['mappingInstance'] = $mappingInformation;
            $return[$indexName][$typeName]['properties'] = $mappingInformation->getProperties();
        }

        return $return;
    }
protected function buildArrayFromMappingCollection(MappingCollection $mappingCollection)
    {
        $return = [];

        /** @var $mappingInformation Mapping */
        foreach ($mappingCollection as $mappingInformation) {
            $indexName = $mappingInformation->getType()->getIndex()->getName();
            $typeName = $mappingInformation->getType()->getName();
            if (isset($return[$indexName][$typeName])) {
                throw new ElasticSearchException('There was more than one mapping present in index %s with type %s, which must not happen.', 1339758480);
            }

            $return[$indexName][$typeName]['mappingInstance'] = $mappingInformation;
            $return[$indexName][$typeName]['properties'] = $mappingInformation->getProperties();
        }

        return $return;
    }
protected function buildArrayFromMappingCollection ( MappingCollection $ mappingCollection ) { $ return = [ ] ; /** @var $mappingInformation Mapping */ foreach ( $ mappingCollection as $ mappingInformation ) { $ indexName = $ mappingInformation -> getType ( ) -> getIndex ( ) -> getName ( ) ; $ typeName = $ mappingInformation -> getType ( ) -> getName ( ) ; if ( isset ( $ return [ $ indexName ] [ $ typeName ] ) ) { throw new ElasticSearchException ( 'There was more than one mapping present in index %s with type %s, which must not happen.' , 1339758480 ) ; } $ return [ $ indexName ] [ $ typeName ] [ 'mappingInstance' ] = $ mappingInformation ; $ return [ $ indexName ] [ $ typeName ] [ 'properties' ] = $ mappingInformation -> getProperties ( ) ; } return $ return ; }
Traverses through mappingInformation array and aggregates by index and type names

@param MappingCollection $mappingCollection
@throws ElasticSearchException
@return array with index names as keys, second level type names as keys
Traverses through mappingInformation array and aggregates by index and type names