DependencyInjection/BaseContainerAccessor.php
public function findOneBy(
        string $entityNamespace,
        array $criteria
    ) {
        return $this
            ->getObjectRepository($this->locateEntity($entityNamespace))
            ->findOneBy($criteria);
    }
public function findOneBy(
        string $entityNamespace,
        array $criteria
    ) {
        return $this
            ->getObjectRepository($this->locateEntity($entityNamespace))
            ->findOneBy($criteria);
    }
public function findOneBy ( string $ entityNamespace , array $ criteria ) { return $ this -> getObjectRepository ( $ this -> locateEntity ( $ entityNamespace ) ) -> findOneBy ( $ criteria ) ; }
Get the entity instance with criteria.

@param string $entityNamespace
@param array  $criteria

@return object
Get the entity instance with criteria .