Register the given entity slot class.

@param  string  $className  FQCN
@return  void
354543
public static function register($className)
    {
        $dispatcher = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');

        $dispatcher->connect(
            'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend',
            'afterInsertObject',
            $className,
            'afterInsertObject'
        );

        $dispatcher->connect(
            'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend',
            'afterUpdateObject',
            $className,
            'afterUpdateObject'
        );

        $dispatcher->connect(
            'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Backend',
            'afterRemoveObject',
            $className,
            'afterRemoveObject'
        );
    }
1042982
public function registerEntity(&$entity)
    {
        $this->unstashEntity($entity);

        $className    = $this->getClassName($entity);
        $objectHashId = $this->getObjectHashId($entity);
        $entityId     = $this->getEntityId($entity);

        if (!isset($this->entities[$className])) {
            $this->entities[$className] = [];
        }

        if (isset($this->entities[$className][$entityId])) {
            // Change the reference of the input entity to the one that's already registered
            $entity = $this->entities[$className][$entityId];
        } else {
            // Register this entity
            $this->changeTracker->startTracking($entity);
            $this->entities[$className][$entityId] = $entity;
            $this->entityStates[$objectHashId]     = EntityStates::REGISTERED;
        }
    }
772924
public function addClass($className)
    {
        $attr = $this->getAttribute('class');
        if ($attr != '') {
            $attr .= ' ';
        }
        $attr .= (string) $className;

        $this->setAttribute('class', $attr);
    }
193471
public function addNode(string $className): void
    {
        if (isset($this->nodes[$className])) {
            return;
        }

        $this->nodes[$className] = new DocumentGraphNode($className);
    }
996518
protected function registerCustomBindings(): void
    {
        $entityServiceFactory = $this->app->make(IEntityServiceFactory::class);

        foreach (config('laravel_entity_services.bindings') as $className => $entityService) {
            $entityServiceFactory->register($className, $entityService);
        }
    }
237018
protected function _register($id, $className)
    {
        $id = (string) $id;
        if (class_exists($className)) {
            self::$_loaded[$id] = $className;
            $this[$id] = function () use ($className) {
                return new $className();
            };
        } else {
            throw new Exception("Helper \"{{$className}}\" not found!");
        }
    }
987091
public function setDefaultRepositoryClassName($className)
    {
        $reflectionClass = new \ReflectionClass($className);

        if (!$reflectionClass->implementsInterface(ObjectRepository::class)) {
            throw PHPCRException::invalidDocumentRepository($className);
        }

        $this->attributes['defaultRepositoryClassName'] = $className;
    }
294667
public function registerClass($property, $className)
    {
        // Make sure the $className is prefixed with a backslash
        $className = '\\' . ltrim($className, '\\');

        $this->classes[$property] = $className;
        return $this;
    }
772055
public function load($className) {
        if (class_exists($className, FALSE) || interface_exists($className, FALSE)) {
            return;
        }

        foreach ($this->dirs as $dir) {
            if ($this->loadClass($this->basePath . DIRECTORY_SEPARATOR . $dir, $className)) {
                return;
            }
    	}
    }
501009
public static function fromClassNameAndIdentifier($className, array $id)
    {
        $ids = [];

        foreach ($id as $key => $value) {
            $ids[] = $key . '(' . $value . ')';
        }

        return new self(
            'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found'
        );
    }
129270
private function registerRoute(string $className, array $routes, string $prefix, bool $coroutine, $server)
    {
        foreach ($routes as $route) {
            $mappedName = $route['mappedName'];
            $methodName = $route['methodName'];
            if (empty($mappedName)) {
                $mappedName = $methodName;
            }

            $commandKey = $this->getCommandString($prefix, $mappedName);
            $this->routes[$commandKey] = [$className, $methodName, $coroutine, $server];
        }

        $commandKey = $this->getCommandString($prefix, $this->defaultCommand);
        $this->routes[$commandKey] = [$className, $this->defaultCommand];
    }
50634
public function newManager($classname) {
		$profile = Profiler::getClassProfile($classname);
		if (!$profile->isEntity())
			throw new \InvalidArgumentException(sprintf("Class %s is not declared as an entity", $profile->reflectionClass->getName()));
		return new Manager($this, $profile);
	}
832180
public function loadClass($className)
    {
        if ($filePath = $this->resolveFileName($className)) {
            if ($this->getFailureFlag() & self::FAIL_GRACEFULLY) {
                if ($this->classFileExists($filePath)) {
                    require_once $filePath;
                }
            } else {
                require_once $filePath;
            }
        }
    }
101494
protected function applyRule(AbstractNode $allocatedClass, ClassNode $classNode): void
    {
        $entityNamePattern = '/^Spy/';
        $queryNamePattern = '/Query$/';

        $classReference = $allocatedClass->getFirstChildOfType('ClassReference');

        if ($classReference === null) {
            return;
        }

        $className = $classReference->getName();
        $className = explode('\\', $className);
        $className = array_pop($className);

        if (!preg_match($entityNamePattern, $className)
            || preg_match($queryNamePattern, $className)
        ) {
            return;
        }

        $message = sprintf(
            'Entity `%s` initialized in `%s`. The class violates rule `%s`.',
            $className,
            $classNode->getFullQualifiedName(),
            static::RULE
        );

        $this->addViolation($classNode, [$message]);
    }
1249016
public function autoload($className)
    {
        if (0 === strpos($className, $this->prefix)) {
            $parts = explode('\\', substr($className, $this->prefixLength));
            $filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php';

            if (is_file($filepath)) {
                require $filepath;
            }
        }
    }
1260330
private function setObjectForClass(ClassName $className, array $data)
    {
        $fqdnClass = $className->getValue();
        $object = new $fqdnClass();

        foreach ($data as $attribute => $value) {
            $configurationObject = $this->configuration->getConfigurationObjectForClass($className);
            $type = $configurationObject->getTypeForAttribute($attribute);

            $this->processDeserializeForType($type, $object, $value);
        }

        return $object;
    }
361534
public function registerComponent($className, $code = null, $plugin = null)
    {
        if (!$this->classMap) {
            $this->classMap = [];
        }

        if (!$this->codeMap) {
            $this->codeMap = [];
        }

        if (!$code) {
            $code = Str::getClassId($className);
        }

        if ($code == 'viewBag' && $className != 'Cms\Components\ViewBag') {
            throw new SystemException(sprintf(
                'The component code viewBag is reserved. Please use another code for the component class %s.',
                $className
            ));
        }

        $className = Str::normalizeClassName($className);
        $this->codeMap[$code] = $className;
        $this->classMap[$className] = $code;
        if ($plugin !== null) {
            $this->pluginMap[$className] = $plugin;
        }
    }