@param $className

@return string
176544
public function getDefaultTemplate($className)
    {
        /**
         * todo replace with config object
         */
        return APPLICATION_PATH .
        strtolower(
            str_replace(array('\\'), '/',
                str_replace(
                    $this->applicationNamespace, '', str_replace(
                        'controller', 'view', $className
                    )
                )
            )
        );
    }
1349034
public function getModuleNameByClassName($className)
    {
        $resultModuleName = $this->autoDetectModuleNameByClassName($className);
        if (null === $resultModuleName) {
            $errMsg = sprintf('Unable to determine the module name for a class of %s', $className);
            throw new Exception\ResolveModuleNameException($errMsg);
        }

        return $resultModuleName;
    }
192469
public static function getNamespace($className)
    {
        if (is_object($className)) {
            $className = get_class($className);
        }
        if (strpos($className, '\\') === false) {
            return '';
        }
        return preg_replace('/\\\\[^\\\\]+$/', '', $className);
    }
58410
public static function getClassName($className)
    {
        if (is_object($className)) {
            $className = get_class($className);
        }
        $className = array_slice(explode('\\', $className), - 1);
        return $className[0];
    }
835766
public function getClassDefinition($className)
    {
        foreach ($this->definitions as $key => $value) {
            if (!strcasecmp($key, $className)) {
                return $value;
            }
        }

        return false;
    }
577794
public function autoDetectModuleNameByClassName($className)
    {
        if (array_key_exists($className, $this->classNameToModuleName)) {
            $resultModuleName =  $this->classNameToModuleName[$className];
        } else {
            $index = $this->getModulesIndex();
            $classNameLength = strlen($className);

            $resultModuleName = null;
            foreach ($index as $moduleName => $moduleNameLength) {
                if ($classNameLength > $moduleNameLength && 0 === strrpos($className, $moduleName)) {
                    $resultModuleName = $moduleName;
                    break;
                }
            }
            $this->classNameToModuleName[$className] = $resultModuleName;
        }

        return $resultModuleName;
    }
700519
public static function oldClassName($className)
    {
        // If class name has first symbol as NS_SEPARATOR - remove it to avoid ugly classes _samson_core_...
        if ($className{0} == self::NS_SEPARATOR) {
            $className = substr($className, 1);
        }

        // Convert NS_SEPARATOR to namespace
        return strtolower(str_replace(self::NS_SEPARATOR, '_', $className));
    }
296585
protected function getClassMetadata($className)
    {
        if (! isset($this->metadataCache[$className])) {
            $this->metadataCache[$className] = $this->em->getClassMetadata($className);
        }

        return $this->metadataCache[$className];
    }
1115166
private function extractClass(string $className): string
    {
        // If class name contain ":" symbol
        if (strpos($className, ':') !== false) {
            $classArray = explode(':', $className);
            $className = $classArray[0];
        }
        return $className;
    }
521532
public function resolveFileName($className)
    {
        if (
            null === $this->getNamespace() ||
            $this->getNamespace().$this->getNamespaceSeparator() === substr($className, 0, strlen($this->getNamespace().$this->getNamespaceSeparator()))
        ) {
            $fileName   = '';
            $namespace  = '';
            if (false !== ($lastNsPos = strripos($className, $this->getNamespaceSeparator()))) {
                $namespace  = substr($className, 0, $lastNsPos);
                $className  = substr($className, $lastNsPos + 1);
                $fileName   = str_replace($this->getNamespaceSeparator(), DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
            }
            $fileName  .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->getFileExtension();
            return ($this->getIncludePath() !== null ? $this->getIncludePath() . DIRECTORY_SEPARATOR : '') . $fileName;
        }
        return null;
    }
373195
public static function getDeliveryShortName($className)
    {
        if (0 === strpos($className, '\\')) {
            $className = substr($className, 1);
        }
        if (0 === strpos($className, 'Boxberry\\')) {
            return trim(str_replace('\\', '_', substr($className, 8, -7)), '_');
        }

        return '\\' . $className . '\\Delivery';
    }
849649
public function getClassByName($className)
    {
        $classMap = $this->getClassMap($this->splitClassName($className)) . "[\"__class\"]";
        $return = null;

        eval(
            "if (isset(\$this->indexedClasses$classMap)) {"
            . " \$return = \$this->indexedClasses$classMap;"
            . "}"
        );

        return $return;
    }
974002
public static function getStorageKey($className)
    {
        $key = $className;

        if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) {
            $bcMap = self::getBackwardsCompatibilityClassMap();
            $key = isset($bcMap[strtolower($key)]) ? $bcMap[strtolower($key)] : strtolower($key);
        }

        return $key;
    }
474068
protected function getScaffoldedModel($className)
    {
        if (! $fields = $this->cache->getFields())
        {
            return str_replace('{{rules}}', '', $this->template);
        }

        $rules = array_map(function($field) {
            return "'$field' => 'required'";
        }, array_keys($fields));

        return str_replace('{{rules}}', PHP_EOL."\t\t".implode(','.PHP_EOL."\t\t", $rules) . PHP_EOL."\t", $this->template);
    }
114440
public function activeClass(string $className = ''): string
    {
        if (! $className) {
            $className = config('menus.active_class_name');
        }

        return $this->isActive() ? $className : '';
    }
1234532
private static function getInstance(string $className): string
    {
        $collector = EntityCollector::getCollector();
        if (!isset($collector[$className]['instance'])) {
            return Pool::INSTANCE;
        }

        return $collector[$className]['instance'];
    }
1216977
public static function getMailerClassName($className)
    {
        if (class_exists($className)) {
            return $className;
        }

        // replace underscores with namespace marker, PSR-0 style
        $fullyQualified = '\\Omnimail\\' . str_replace('_', '\\', $className);
        if (!class_exists($fullyQualified)) {
            $fullyQualified = $fullyQualified . '\\Mailer';
            if (!class_exists($fullyQualified)) {
                throw new \Exception("Class '${className}' not found");
            }
        }

        return $fullyQualified;
    }