/**
  * Checks whether the given namespace is registered in the Doctrine
  *
  * @param string $namespace
  * @return bool
  */
 public function isKnownEntityClassNamespace($namespace)
 {
     foreach (array_keys($this->doctrine->getManagers()) as $name) {
         $namespaces = $this->doctrine->getManager($name)->getConfiguration()->getEntityNamespaces();
         if (in_array($namespace, $namespaces, true)) {
             return true;
         }
     }
     return false;
 }
 /**
  * Loads table name <-> entity class name maps
  */
 protected function loadNameMaps()
 {
     $this->tableToClassMap = [];
     $this->classToTableMap = [];
     $names = array_keys($this->doctrine->getManagers());
     foreach ($names as $name) {
         $manager = $this->doctrine->getManager($name);
         if ($manager instanceof EntityManager) {
             $allMetadata = $this->getAllMetadata($manager);
             foreach ($allMetadata as $metadata) {
                 $tableName = $metadata->getTableName();
                 if (!empty($tableName)) {
                     $className = $metadata->getName();
                     $this->tableToClassMap[$tableName] = $className;
                     $this->classToTableMap[$className] = $tableName;
                 }
             }
         }
     }
 }