src/Entity/Factory/EntityDependencyInjector.php
public function injectEntityDependencies(EntityInterface $entity): void
    {
        $this->buildEntityInjectMethodsForEntity($entity);
        $entityFqn = $this->leadingSlash($entity::getDoctrineStaticMeta()->getReflectionClass()->getName());
        $this->injectStatic($entity, $this->entityInjectMethods[$entityFqn][self::TYPE_KEY_STATIC]);
        $this->inject($entity, $this->entityInjectMethods[$entityFqn][self::TYPE_KEY_INSTANCE]);
    }
public function injectEntityDependencies(EntityInterface $entity): void
    {
        $this->buildEntityInjectMethodsForEntity($entity);
        $entityFqn = $this->leadingSlash($entity::getDoctrineStaticMeta()->getReflectionClass()->getName());
        $this->injectStatic($entity, $this->entityInjectMethods[$entityFqn][self::TYPE_KEY_STATIC]);
        $this->inject($entity, $this->entityInjectMethods[$entityFqn][self::TYPE_KEY_INSTANCE]);
    }
public function injectEntityDependencies ( EntityInterface $ entity ) : void { $ this -> buildEntityInjectMethodsForEntity ( $ entity ) ; $ entityFqn = $ this -> leadingSlash ( $ entity :: getDoctrineStaticMeta ( ) -> getReflectionClass ( ) -> getName ( ) ) ; $ this -> injectStatic ( $ entity , $ this -> entityInjectMethods [ $ entityFqn ] [ self :: TYPE_KEY_STATIC ] ) ; $ this -> inject ( $ entity , $ this -> entityInjectMethods [ $ entityFqn ] [ self :: TYPE_KEY_INSTANCE ] ) ; }
This method loops over the inject methods for an Entity and then injects the relevant dependencies

We match the method argument type with the dependency to be injected.

@param EntityInterface $entity
This method loops over the inject methods for an Entity and then injects the relevant dependencies