This method accepts a fully-qualified class name and creates it.

@param string $className Fully-qualified class name

@deprecated It is highly recommended you don't use this method.

@return Module
@throws NonexistentSubModuleException
179918
public function createSubModule ($className)
		{
			if (! class_exists($className) || ! is_subclass_of($className, '\LiftKit\Module\Module')) {
				throw new NonexistentSubModuleException('Class name is not module: ' . $className);
			}

			return new $className($this->container);
		}
1060604
protected function isValidApplicationClass(string $className): bool
    {
        $reflectionClass = new ReflectionClass($className);

        return
            $reflectionClass->isInstantiable() === true &&
            $reflectionClass->implementsInterface(ApplicationInterface::class) === true;
    }
949404
public function addClass($className)
    {
        list($oldClassArray, $newClassArray) = $this->getClassArrays($className);

        $this->attributes['class'] = implode(array_unique(array_merge($oldClassArray, $newClassArray)), ' ');

        return $this;
    }
1346582
public function reflectInterface($className): ReflectionInterface
    {
        $className = ClassName::fromUnknown($className);

        $class = $this->reflectClassLike($className);

        if (false === $class instanceof ReflectionInterface) {
            throw new ClassNotFound(sprintf(
                '"%s" is not an interface, it is a "%s"',
                $className->full(),
                get_class($class)
            ));
        }

        return $class;
    }
384944
public static function __supportAutoDestroy($className)
    {
        if (empty(MI::$__reflections[$className])) {
            $reflection  = new \ReflectionClass($className);
            $default     = $reflection->getDefaultProperties();
            $public      = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC);
            $private     = $reflection->getProperties(\ReflectionProperty::IS_PRIVATE);
            $protect     = $reflection->getProperties(\ReflectionProperty::IS_PROTECTED);
            $static      = $reflection->getProperties(\ReflectionProperty::IS_STATIC);
            $autoDestroy = [];
            foreach ($public as $val) {
                $autoDestroy[Marco::DS_PUBLIC][$val->getName()] = $default[$val->getName()];
            }

            foreach ($private as $val) {
                $autoDestroy[Marco::DS_PRIVATE][$val->getName()] = $default[$val->getName()];
            }

            foreach ($protect as $val) {
                $autoDestroy[Marco::DS_PROTECTED][$val->getName()] = $default[$val->getName()];
            }

            foreach ($static as $val) {
                if (isset($autoDestroy[Marco::DS_PUBLIC])) {
                    unset($autoDestroy[Marco::DS_PUBLIC][$val->getName()]);
                }

                if (isset($autoDestroy[Marco::DS_PROTECTED])) {
                    unset($autoDestroy[Marco::DS_PROTECTED][$val->getName()]);
                }

                if (isset($autoDestroy[Marco::DS_PRIVATE])) {
                    unset($autoDestroy[Marco::DS_PRIVATE][$val->getName()]);
                }
            }

            unset($autoDestroy[Marco::DS_PUBLIC]['__useCount']);
            unset($autoDestroy[Marco::DS_PUBLIC]['__genTime']);
            unset($autoDestroy[Marco::DS_PUBLIC]['__coreName']);
            unset($autoDestroy[Marco::DS_PUBLIC]['__DSLevel']);
            unset($autoDestroy[Marco::DS_PUBLIC]['__reflections']);
            MI::$__reflections[$className] = $autoDestroy;
            unset($reflection);
            unset($default);
            unset($public);
            unset($private);
            unset($protect);
            unset($static);
        }
    }
273733
protected function buildClassSchema($className)
    {
        if (!class_exists($className)) {
            throw new Exception('The classname "' . $className . '" was not found and thus can not be reflected.', 1278450972);
        }
        $classSchema = $this->objectManager->get(ClassSchema::class, $className);
        if (is_subclass_of($className, \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class)) {
            $classSchema->setModelType(ClassSchema::MODELTYPE_ENTITY);
            $possibleRepositoryClassName = ClassNamingUtility::translateModelNameToRepositoryName($className);
            if (class_exists($possibleRepositoryClassName)) {
                $classSchema->setAggregateRoot(true);
            }
        } elseif (is_subclass_of($className, \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject::class)) {
            $classSchema->setModelType(ClassSchema::MODELTYPE_VALUEOBJECT);
        }
        foreach ($this->getClassPropertyNames($className) as $propertyName) {
            if (!$this->isPropertyTaggedWith($className, $propertyName, 'transient') && $this->isPropertyTaggedWith($className, $propertyName, 'var')) {
                $cascadeTagValues = $this->getPropertyTagValues($className, $propertyName, 'cascade');
                $classSchema->addProperty($propertyName, implode(' ', $this->getPropertyTagValues($className, $propertyName, 'var')), $this->isPropertyTaggedWith($className, $propertyName, 'lazy'), $cascadeTagValues[0] ?? null);
            }
            if ($this->isPropertyTaggedWith($className, $propertyName, 'uuid')) {
                $classSchema->setUuidPropertyName($propertyName);
            }
            if ($this->isPropertyTaggedWith($className, $propertyName, 'identity')) {
                $classSchema->markAsIdentityProperty($propertyName);
            }
        }
        $this->classSchemata[$className] = $classSchema;
        $this->dataCacheNeedsUpdate = true;
        return $classSchema;
    }
1320788
public static function instantiate($className)
    {
        $objectManager = self::get()->getObjectManager();
        $args = func_get_args();

        if (1 === count($args)) {
            return $objectManager->get($className);
        }

        return call_user_func_array([$objectManager, 'get'], $args);
    }
162990
protected function getCompatibleClass( $className )
  {
    if( ! $className || ! is_string( $className )){
      $className = get_class( $this );
    }
    $class = $className;

    if( ! $this->checkClassForCompability( $class )){
      $class = $this->checkClassForCompability( $class .'Exception' );
    }

    if( ! $class ) {
      if( $parent = get_parent_class( $className ) ) {
        $class = $this->getCompatibleClass( $parent );
      } else {
        $class = __NAMESPACE__ .'\DeferredExceptionsException';
      }
    }

    return $class;
  }
314117
public function make($className)
    {
        // Create a reflection to access the class properties
        $reflection = new \ReflectionClass($className);

        // If the class has no constructor, just return a new instance
        $constructor = $reflection->getConstructor();
        if (is_null($constructor)) {
            return new $className;
        }

        // Or get the constructor parameters and instance dependencies
        $dependencies = [];
        $parameters = $reflection->getConstructor()->getParameters();
        foreach ($parameters as $param) {
            $class = $param->getClass();
            if ($class && $class->getName() === 'Laito\App') {

                // If the dependency is the app itself, inject the current instance
                $dependencies[] = $this;
            } else {

                // Otherwise, inject the instantiated dependency or a null value
                $dependencies[] = $class? $this->make($class->name) : 'NULL';
            }
        }

        // Return the class instance
        $instance = $reflection->newInstanceArgs($dependencies);

        // If the class has a boot method, run it
        if (method_exists($instance, 'boot')) {
            $instance->boot();
        }

        // Return instance
        return $instance;
    }
515577
public function create($className)
        {
            $facade = $this->helper->getFacadeClassName($className);

            if (!class_exists($facade)) {
                throw new RuntimeException("Class '$facade' not found");
            }
            $className = $this->helper->getSDKClassName($className);
            return new $facade(new $className($this->httpClient));
        }
1150634
public function asClass(string $className)
    {
        if (!is_a($className, $this->class->getClassName(), true)) {
            throw InvalidArgumentException::format(
                    'Invalid call to %s: class name must be compatible with type %s, %s given',
                    __METHOD__, $this->class->getClassName(), $className
            );
        }

        $this->fromCallback(function () use ($className) {
            return $className;
        });
    }
839538
protected function createInstance($className, $name)
    {
        $formConfiguration = $this->typoScriptService->getFormConfiguration($className);

        /** @var FormObject $instance */
        $instance = Core::instantiate(FormObject::class, $className, $name, $formConfiguration);

        $this->insertObjectProperties($instance);

        $instance->getHash();

        return $instance;
    }
152619
public static function fromString($className)
    {
        $atoms = explode(static::NAMESPACE_SEPARATOR, $className);
        $isAbsolute = false;
        if ('' === $atoms[0]) {
            $isAbsolute = true;
            array_shift($atoms);
        }

        return static::fromAtoms($atoms, $isAbsolute);
    }
371048
public static function loadModule($moduleName) {
        $moduleConf = self::getModuleConf($moduleName);

        try {

            if (isset($moduleConf['requires_php_extension']) && is_array($moduleConf['requires_php_extension'])) {
                self::checkPhpExtensions($moduleConf['requires_php_extension']);
            }

            $tmpModule = new \ReflectionClass('\\pff\\modules\\' . $moduleConf['class']);
            if ($tmpModule->isSubclassOf('\\pff\\Abs\\AModule')) {
                $moduleName = strtolower($moduleConf['name']);

                if (isset(self::$_modules[$moduleName])) { //Module has already been loaded
                    return self::$_modules[$moduleName];
                }

                self::$_modules[$moduleName] = $tmpModule->newInstance();
                self::$_modules[$moduleName]->setModuleName($moduleConf['name']);
                self::$_modules[$moduleName]->setModuleVersion($moduleConf['version']);
                self::$_modules[$moduleName]->setModuleDescription($moduleConf['desc']);
                self::$_modules[$moduleName]->setConfig(ServiceContainer::get('config'));
                self::$_modules[$moduleName]->setApp(ServiceContainer::get('app'));
                (isset($moduleConf['runBefore']))? $moduleLoadBefore = $moduleConf['runBefore']: $moduleLoadBefore = null ;

                if (isset ($moduleConf['requires']) && is_array($moduleConf['requires'])) {
                    self::$_modules[$moduleName]->setModuleRequirements($moduleConf['requires']);
                    foreach ($moduleConf['requires'] as $requiredModuleName) {
                        self::loadModule($requiredModuleName);
                        self::$_modules[$moduleName]->registerRequiredModule(self::$_modules[$requiredModuleName]);
                    }
                }

                if ($tmpModule->isSubclassOf('\pff\Iface\IHookProvider')) {
                    ServiceContainer::get('hookmanager')->registerHook(self::$_modules[$moduleName], $moduleName, $moduleLoadBefore);
                }

                return self::$_modules[$moduleName];

            } else {
                throw new ModuleException("Invalid module: " . $moduleConf['name']);
            }
        }
        catch (\ReflectionException $e) {
            throw new ModuleException("Unable to create module instance: " . $e->getMessage());
        }

    }
449461
public function fullyQualifiedClassName($className)
    {
        if ($className !== null && strpos($className, '\\') === false && strlen($this->namespace) > 0) {
            return $this->namespace.'\\'.$className;
        }

        return $className;
    }
1181196
public function loadClass($className)
    {
        foreach ($this->maps as $name => $path) {
            if (strtolower($name) == strtolower($className)) {
                $this->requireFile($this->maps[$name]);

                break;
            }
        }

        return $this;
    }
257833
public function removeClass($className)
    {
        list($oldClassArray, $newClassArray) = $this->getClassArrays($className);

        $this->attributes['class'] = implode(array_diff($oldClassArray, $newClassArray), ' ');

        return $this;
    }