/**
  * @return array
  */
 private function indexEntityClassNames()
 {
     $indexedClassNames = [];
     $entityClassNames = $this->em->getConfiguration()->getMetadataDriverImpl()->getAllClassNames();
     foreach ($entityClassNames as $name) {
         // @todo Support subtypes.
         $resourceType = Util\Inflector::typify($name);
         $indexedClassNames[$resourceType][] = $name;
     }
     //Config class override
     foreach ($this->getResourcesConfig()->getAll() as $resource) {
         if (!empty($resource->type) && !empty($resource->class)) {
             $indexedClassNames[$resource->type] = array($resource->class);
         }
     }
     return $indexedClassNames;
 }
Example #2
0
 /**
  * @param string|ResourceEntityInterface $entityClass
  * @return string
  */
 protected function parseSubtype($entityClassName)
 {
     $class = $this->metadataCache->getReflection($entityClassName);
     return Inflector::typify($class->getShortName());
 }