getName() public method

{@inheritDoc}
public getName ( )
 function it_configures_the_mappings_of_a_model_that_overrides_an_original_model($configuration, ClassMetadataInfo $metadataInfo, MappingDriver $mappingDriver)
 {
     $originalQux1 = __NAMESPACE__ . '\\OriginalQux1';
     $originalQux2 = __NAMESPACE__ . '\\OriginalQux2';
     $overrideQux1 = __NAMESPACE__ . '\\OverrideQux1';
     $overrideQux2 = __NAMESPACE__ . '\\OverrideQux2';
     $mappingDriver->getAllClassNames()->willReturn([$originalQux1]);
     $configuration->getMetadataDriverImpl()->willReturn($mappingDriver);
     $metadataInfo->getName()->willReturn($overrideQux1);
     $mappingDriver->loadMetadataForClass($originalQux1, Argument::any())->shouldBeCalled();
     $overrides = [['original' => $originalQux1, 'override' => $overrideQux1], ['original' => $originalQux2, 'override' => $overrideQux2]];
     $this->configure($metadataInfo, $overrides, $configuration);
 }
 /**
  * Set the association mappings of a metadata.
  *
  * @param ClassMetadataInfo $metadata
  * @param Configuration     $configuration
  */
 protected function setAssociationMappings(ClassMetadataInfo $metadata, Configuration $configuration)
 {
     $supportedClasses = $configuration->getMetadataDriverImpl()->getAllClassNames();
     foreach (class_parents($metadata->getName()) as $parent) {
         if (in_array($parent, $supportedClasses)) {
             $parentMetadata = new MongoClassMetadata($parent);
             $configuration->getMetadataDriverImpl()->loadMetadataForClass($parent, $parentMetadata);
             foreach ($parentMetadata->associationMappings as $key => $value) {
                 if ($this->hasRelation($value['association'])) {
                     $metadata->associationMappings[$key] = $value;
                 }
             }
         }
     }
 }
 /**
  * @param ClassMetadataInfo $metadata
  * @param $configuration
  */
 private function setAssociationMappings(ClassMetadataInfo $metadata, $configuration)
 {
     foreach (class_parents($metadata->getName()) as $parent) {
         $parentMetadata = new ClassMetadata($parent);
         if (in_array($parent, $configuration->getMetadataDriverImpl()->getAllClassNames())) {
             $configuration->getMetadataDriverImpl()->loadMetadataForClass($parent, $parentMetadata);
             if ($parentMetadata->isMappedSuperclass) {
                 foreach ($parentMetadata->associationMappings as $key => $value) {
                     if ($this->hasRelation($value['association'])) {
                         $metadata->associationMappings[$key] = $value;
                     }
                 }
             }
         }
     }
 }
 /**
  * @param ClassMetadataInfo $metadata
  * @param $configuration
  */
 private function setAssociationMappings(ClassMetadataInfo $metadata, $configuration)
 {
     foreach (class_parents($metadata->getName()) as $parent) {
         if (false === in_array($parent, $configuration->getMetadataDriverImpl()->getAllClassNames())) {
             continue;
         }
         $parentMetadata = new ClassMetadata($parent, $configuration->getNamingStrategy());
         // Wakeup Reflection
         $parentMetadata->wakeupReflection($this->getReflectionService());
         // Load Metadata
         $configuration->getMetadataDriverImpl()->loadMetadataForClass($parent, $parentMetadata);
         if (false === $this->isResource($parentMetadata)) {
             continue;
         }
         if ($parentMetadata->isMappedSuperclass) {
             foreach ($parentMetadata->associationMappings as $key => $value) {
                 if ($this->hasRelation($value['association'])) {
                     $metadata->associationMappings[$key] = $value;
                 }
             }
         }
     }
 }