gets the right class string of a version

@param string $class

@return string
@throws RepositoryException
@author Daniel Wendlandt
166879
protected function getClass($class)
    {
        if(ClientVersionMapInterface::VERSION_V090X === $this->versionFolder) {
            throw new RepositoryException('Version folder ' .
                ClientVersionMapInterface::VERSION_V090X . ' is not allowed for cat repository');
        }

        return parent::getClass($class);
    }
1206292
public function getClass($class)
    {
        $this->checkClass($class);

        if (null === $this->infoClass) {
            $infoClass = get_class($this).'Info';
            $this->infoClass = new $infoClass();
        }

        return $this->infoClass->{'get'.str_replace('\\', '', $class).'Class'}();
    }
679522
public function getRepository($className = null){
      if($className === null){
        $repo = $this->getRepository(static::REPOSITORY_NAMESPACE);
      }else{
        $repo = $this->getEntityManager()->getRepository($className);
      }
      return $repo;
    }
1301995
protected function _getClassName($class)
    {
        $class = Str::low($class);
        list ($plugin, $className) = pluginSplit($class);
        $return = self::HELPER_SUFFIX . '\\' . Inflector::camelize($className) . self::HELPER_SUFFIX;
        if ($plugin !== null) {
            return Inflector::camelize($plugin) . '\\' . $return;
        }

        return Configure::read('App.namespace') . '\\' . $return;
    }
1083361
public static function getClassStatics($class) {
        $ret = '';

        foreach ($class->getStaticProperties() as $name => $value) {
            $ret .= " public static \${$name} = " . var_export($value, true) . ";\n";
        }

        return $ret;
    }
820883
public function getEntityRepositories($class)
    {
        $identifiers = $this->getEntityIdentifiers($class);

        foreach ($identifiers as $i => $identifier) {
            $identifiers[$i] = AnDomain::getRepository($identifier);
        }

        return $identifiers;
    }
566508
public function getParentOfClass($class)
    {
        // Check for namespace alias
        if (strpos($class, ':') !== false) {
            list($namespaceAlias, $simpleClassName) = explode(':', $class);
            $class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        if ($this->getParent() === null) {
            return null;
        }
        if ($this->parent->getPage() instanceof $class) {
            return $this->parent;
        }

        return $this->parent->getParentOfClass($class);
    }
398504
public function getRepository($entityClass)
    {
        if (is_object($entityClass)) {
            $entityClass = get_class($entityClass);
        }

        if (!isset($this->repositories[$entityClass])) {
            throw new \Exception("no repository defined for: $entityClass");
        }

        if (!is_object($this->repositories[$entityClass])) {
            $this->repositories[$entityClass] = $this->di->get($this->repositories[$entityClass]);
        }

        return $this->repositories[$entityClass];
    }
569298
public static function getRealNamespace($class)
    {
        if (($lastNsPos = strrpos($realClass = self::getRealClass($class), '\\')) !== false) {
            return substr($realClass, 0, $lastNsPos);
        }
    }
1291130
public function type($class)
    {
        // Remove leading backslash. All namespaces are assumed absolute in YAML
        $class = ltrim($class, '\\');

        foreach ($this->types as $scaffold) {
            if ($scaffold->getDataObjectClass() === $class) {
                return $scaffold;
            }
        }

        $scaffold = Injector::inst()->create(DataObjectScaffolder::class, $class)
                ->setChainableParent($this);
        $this->types[] = $scaffold;

        return $scaffold;
    }
614734
private function getMetadata($class)
    {
        $class = ClassUtils::getRealClass(ltrim($class, '\\'));

        if (!array_key_exists($class, $this->metadataCache)) {
            $this->metadataCache[$class] = null;

            if (null !== $manager = $this->registry->getManagerForClass($class)) {
                $this->metadataCache[$class] = $manager->getClassMetadata($class);
            }
        }

        return $this->metadataCache[$class];
    }
1055149
public static function classNameShort($class) {
        $className = self::className($class);

        $position = strrpos($className, '\\');
        $name = substr($className, $position + 1);

        return $name;
    }
19378
public function getRepositoryFor($class)
    {
        $metadata = $this->getMetadataManager()->getMetadataFor($class);
        $repositoryClass = $metadata->getEntityRepositoryClass();
        
        $identity = new ObjectIdentity(sprintf('%s@%s', $repositoryClass, $class));
        
        if (!$this->getClassManager()->hasShared($identity->getIdentifier())) {
            $repository = $this->getClassManager()->createInstanceFor($repositoryClass, ...[$class]);
            $this->getClassManager()->setShared($identity->getIdentifier(), $repository);
        }
        
        return $this->getClassManager()->getShared($identity->getIdentifier());
    }
1067878
private function getObjectMapping(string $class): NormalizationObjectMappingInterface
    {
        try {
            return $this->normalizerObjectMappingRegistry->getObjectMapping($class);
        } catch (SerializerLogicException $exception) {
            $this->logger->error('serialize: {exception}', ['exception' => $exception->getMessage()]);

            throw $exception;
        }
    }
604418
public static function getModel($class)
    {
        if ($class instanceof \rhoone\extension\Extension) {
            $class = $class->className();
        }
        if (is_string($class)) {
            return \rhoone\models\Extension::find()->where(['classname' => static::normalizeClass($class)])->one();
        }
        if ($class instanceof \rhoone\models\Extension) {
            return \rhoone\models\Extension::find()->guid($class->guid)->one();
        }
        return null;
    }
1250884
protected static function getSingleton($class = null)
    {
        //super magic sauce getting the callers class
        if (is_null($class) && function_exists('get_called_class')) {
            $class = get_called_class();
        }
        
        //get routed class, if any
        $class = Route::i()->get($class);
        
        //if it's not set
        if (!isset(self::$instances[$class])) {
            //set it
            self::$instances[$class] = self::getInstance($class);
        }
        
        //return the cached version
        return self::$instances[$class];
    }
84458
public function getChildOfClass($class)
    {
        // Check for namespace alias
        if (strpos($class, ':') !== false) {
            list($namespaceAlias, $simpleClassName) = explode(':', $class);
            $class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        foreach ($this->getChildren() as $child) {
            if ($child->getPage() instanceof $class) {
                return $child;
            }
        }

        return null;
    }