Loads and complete databaseMapping

@param array $databaseMapping
@param string $itemClass
@param array $hitPositions
429879
public function mapDatabase(array $databaseMapping, $itemClass, array $hitPositions)
	{
		$this->databaseMapping = $databaseMapping;
		$this->loadFinalType($hitPositions);
		$this->loadResultSetMappingAndScorePosition($itemClass, $hitPositions);
		$this->finalTypes[$this->scorePos] = Type::INTEGER;
	}
423443
public function entities($entityClassMapperClassMap)
    {
        foreach ($entityClassMapperClassMap as $entity => $mapper) {
            $this->entity($entity)->from($mapper);
        }
    }
23992
public function addMetaData($itemKey, $itemValue, $itemGroup = null)
    {
        $this->getMetaData()->addItem(
            new PagSeguroMetaDataItem($itemKey, $itemValue, $itemGroup)
        );
    }
1321363
public function loadClassMetadata(LoadClassMetadataEventArgs $args)
    {
        if (empty($this->prefix)) {
            return;
        }

        /** @var ClassMetadata $classMetadata */
        $classMetadata = $args->getClassMetadata();

        if (false === strpos($classMetadata->getTableName(), $this->prefix)) {
            $tableName = $this->prefix . $classMetadata->getTableName();
            $classMetadata->setPrimaryTable(['name' => $tableName]);
        }

        foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) {
            if ($mapping['type'] == ClassMetadataInfo::MANY_TO_MANY && $mapping['isOwningSide'] === true) {
                $mappedTableName = $classMetadata->associationMappings[$fieldName]['joinTable']['name'];

                if (false !== strpos($mappedTableName, $this->prefix)) {
                    continue;
                }

                $classMetadata->associationMappings[$fieldName]['joinTable']['name'] = $this->prefix . $mappedTableName;
            }
        }
    }
283225
public function loadEntityDefinitions($itemClass)
	{
		$entities = array();
		$annotations = $this->reader->getClassAnnotations(new \ReflectionClass($itemClass));
		foreach($annotations as $annotation)
		{
			if($annotation instanceof ItemEntity)
			{
				/* @var $annotation \Emhar\SearchDoctrineBundle\Mapping\Annotation\ItemEntity */
				$entity = array();
				$entity['entityClass'] = $annotation->getEntityClass();
				$entity['label'] = $annotation->getLabel();
				$entities[$annotation->getIdentifier()] = $entity;
			}
		}
		return $entities;
	}
193475
public function setHitEntityAttribute($hitIdentifier, $entityIdentifier, $attribute)
	{
		if(!array_key_exists($entityIdentifier, $this->entityClasses))
		{
			throw MappingException::invalidEntity($this->itemClass, $entityIdentifier);
		}
		$this->entityHitMapping[$entityIdentifier][$hitIdentifier] = $attribute;
		return $this;
	}
906205
protected function load_role_mappings() {
        require_once('locallib.php');

        $imsroles = new imsenterprise_roles();
        $imsroles = $imsroles->get_imsroles();

        $this->rolemappings = array();
        foreach ($imsroles as $imsrolenum => $imsrolename) {
            $this->rolemappings[$imsrolenum] = $this->rolemappings[$imsrolename] = $this->get_config('imsrolemap' . $imsrolenum);
        }
    }
47402
public function addNamedNativeQueryResultSetMapping(ClassMetadataInfo $class, $resultSetMappingName)
    {
        $counter        = 0;
        $resultMapping  = $class->getSqlResultSetMapping($resultSetMappingName);
        $rooShortName   = $class->reflClass->getShortName();
        $rootAlias      = strtolower($rooShortName[0]) . $counter;


        if (isset($resultMapping['entities'])) {
            foreach ($resultMapping['entities'] as $key => $entityMapping) {
                $classMetadata  = $this->em->getClassMetadata($entityMapping['entityClass']);

                if ($class->reflClass->name == $classMetadata->reflClass->name) {
                    $this->addEntityResult($classMetadata->name, $rootAlias);
                    $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $rootAlias);
                } else {
                    $shortName      = $classMetadata->reflClass->getShortName();
                    $joinAlias      = strtolower($shortName[0]) . ++ $counter;
                    $associations   = $class->getAssociationsByTargetClass($classMetadata->name);

                    foreach ($associations as $relation => $mapping) {
                        $this->addJoinedEntityResult($mapping['targetEntity'], $joinAlias, $rootAlias, $relation);
                        $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $joinAlias);
                    }
                }

            }
        }

        if (isset($resultMapping['columns'])) {
            foreach ($resultMapping['columns'] as $entityMapping) {
                $this->addScalarResult($entityMapping['name'], $entityMapping['name']);
            }
        }

        return $this;
    }
585926
public static function setDatabaseMap($name, DatabaseMap $map)
    {
        if ($name === null) {
            $name = self::getDefaultDB();
        }
        self::$dbMaps[$name] = $map;
    }
304183
protected function insertEcommerceItems($goal, $itemsToInsert)
    {
        if (empty($itemsToInsert)) {
            return;
        }

        Common::printDebug("Ecommerce items that are added to the cart/order");
        Common::printDebug($itemsToInsert);

        $items = array();

        foreach ($itemsToInsert as $item) {
            $items[] = $this->getItemRowEnriched($goal, $item);
        }

        $this->getModel()->createEcommerceItems($items);
    }
1200061
protected function fillSitemap( $sitemap, $root, SearchResult $results )
    {
        foreach ( $results->searchHits as $searchHit )
        {
            /**
             * @var SearchHit $searchHit
             * @var Location  $location
             *
             */
            $location = $searchHit->valueObject;
            $url      = $this->generateUrl( $location, [ ], UrlGeneratorInterface::ABSOLUTE_URL );
            $modified = $location->contentInfo->modificationDate->format( "c" );
            $loc      = $sitemap->createElement( "loc", $url );
            $lastmod  = $sitemap->createElement( "lastmod", $modified );
            $urlElt   = $sitemap->createElement( "url" );
            $urlElt->appendChild( $loc );
            $urlElt->appendChild( $lastmod );
            $root->appendChild( $urlElt );
        }
    }
349625
void populateDepMap(Map<String, DependencyInfo> depMap) {
		if (uri != null) {
			depMap.put(getFullPathName(), new DependencyInfo(defineDependencies, requireDependencies, dependentFeatures, uri));
		}
		if (children != null) {
			for (Entry<String, DepTreeNode> entry : children.entrySet()) {
				entry.getValue().populateDepMap(depMap);
			}
		}
	}
656883
public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs)
    {
        $classMetadata = $eventArgs->getClassMetadata();
        $entityName = (string) $classMetadata->getName();

        // We dynamically set the user class that was configured in the configuration
        if ($entityName == 'Kunstmaan\NodeBundle\Entity\QueuedNodeTranslationAction') {
            $mapping = array(
                'fieldName' => 'user',
                'targetEntity' => $this->className,
                'joinColumns' => array(array(
                    'name' => 'user_id',
                    'referencedColumnName' => 'id',
                    'unique' => false,
                    'nullable' => true,
                )),
            );
            $classMetadata->mapManyToOne($mapping);
        }
    }
1198525
public static function display(array $assocArgs, ResultCollection $resultCollection): void
    {
        // TODO: Use null coalescing assignment operator.
        $assocArgs['fields'] = $assocArgs['fields'] ?? self::DEFAULT_FIELDS;

        $formatter = new Formatter($assocArgs, $assocArgs['fields']);
        $formatter->display_items(
            self::toTable($resultCollection),
            true
        );
    }
838855
public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs)
    {
        /** @var ClassMetadata $metadata */
        $metadata = $eventArgs->getClassMetadata();

        /** @var \ReflectionClass $reflectionClass */
        $reflectionClass = $metadata->getReflectionClass();

        if ($reflectionClass->getName() !== Payment::class) {
            return;
        }

        $this->logger->debug(
            '[PaymentListener] Entering PaymentListener for « loadClassMetadata » event',
            [$metadata->getReflectionClass()->getName()]
        );

        unset($metadata->fieldMappings['details']);
        unset($metadata->fieldNames['details']);
        unset($metadata->columnNames['details']);

        $metadata->mapField([
            'fieldName' => 'details',
            'type'      => 'array',
        ]);
    }
505188
private function resolveRepositoryLookup(
        LoadEntity $annotation,
        string $entityClass,
        array $mapping
    ) {
        $annotationRepository = $annotation->getRepository();
        $annotationHasRepository = !is_null($annotationRepository) && is_array($annotationRepository);
        if ($annotationHasRepository) {
            $class = $annotation->getRepository()['class'];
            $repository = $this
                    ->container
                    ->has($class)
                ? $this
                    ->container
                    ->get($class)
                : new $class();
        } else {
            $repository = $this
                ->doctrine
                ->getManagerForClass($entityClass)
                ->getRepository($entityClass);
        }

        $method = $annotationHasRepository && isset($annotationRepository['method'])
            ? $annotationRepository['method']
            : 'findOneBy';

        return $repository->$method($mapping);
    }
775384
public void init(final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap) {
        for (Entry<TransactionType, ShardingTransactionManager> entry : transactionManagerMap.entrySet()) {
            entry.getValue().init(databaseType, getResourceDataSources(dataSourceMap));
        }
    }