Registers a custom repository class for the document class.

@param string $repositoryClassName The class name of the custom repository.
774793
public function setCustomRepositoryClassName($repositoryClassName)
    {
        $this->customRepositoryClassName = $this->fullyQualifiedClassName($repositoryClassName);
        if ($this->customRepositoryClassName && !class_exists($this->customRepositoryClassName)) {
            throw MappingException::repositoryNotExisting($this->name, $this->customRepositoryClassName);
        }
    }
987650
private function register(
        Entity $meta,
        Repository $repository
    ): self {
        $this->repositories = $this->repositories->put(
            $meta,
            $repository
        );

        return $this;
    }
118766
private function createRepository(DocumentManager $documentManager, $documentName)
    {
        /* @var $metadata \Doctrine\ODM\CouchDB\Mapping\ClassMetadata */
        $metadata = $documentManager->getClassMetadata($documentName);
        $repositoryClassName = $metadata->customRepositoryClassName
            ?: $documentManager->getDefaultRepositoryClassName();

        return new $repositoryClassName($documentManager, $metadata);
    }
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'
        );
    }
754670
public function handle(DocumentRepository $repository)
    {
        $className = $repository->getClassName();
        if (isset($this->restrictedFieldMap[$className]) && !empty($this->restrictedFieldMap[$className])) {
            $nodes = [];
            foreach ($this->restrictedFieldMap[$className] as $fieldPath => $handlers) {
                $nodes = array_merge(
                    $nodes,
                    $this->getHandlerValue($repository, $fieldPath, $handlers)
                );
            }
            return new AndNode($nodes);
        }
        return false;
    }
1272800
private function generateEntityRepositoryName($fullClassName)
    {
        $namespace = $this->getClassNamespace($fullClassName);

        $repositoryName = $this->repositoryName ?: 'Doctrine\ORM\EntityRepository';

        if ($namespace && $repositoryName[0] !== '\\') {
            $repositoryName = '\\' . $repositoryName;
        }

        return $repositoryName;
    }
1003028
protected function configureRepositories()
    {
        $repositoryManager = new RepositoryManager();
        $this['repository-manager'] = $repositoryManager;

        $path = sprintf('%s/src/Repository', $this->getRootPath());

        $ns = (new \ReflectionObject($this))->getNamespaceName() . '\\Repository';
        $repositoryManager->autoloadPdoRepositories($path, $ns, $this->pdo);

        foreach ($repositoryManager->getRepositories() as $repository) {
            if (is_a($repository, 'Radvance\\Repository\\PermissionRepositoryInterface')) {
                $this->configurePermissionRepository($repository);
            }

            if (is_a($repository, 'Radvance\\Repository\\SpaceRepositoryInterface')) {
                $this->configureSpaceRepository($repository);
            }

            // Register the class for autowiring
            $this[get_class($repository)] = $repository;
        }
    }
173902
function getRepository($entityName)
    {
        if (isset($this->cachedRepository[$entityName])) {
            return $this->cachedRepository[$entityName];
        }
        $className = "Fredy\\Model\\Repository\\Repository";
        $entityClassName = 'Model\\Entity\\'.$entityName;
        return new $className(new $entityClassName(),$this->db);
    }
802030
public function getRepository($className)
    {
        if (isset($this->repositories[$className])) {
            return $this->repositories[$className];
        }

        $metadata = $this->getClassMetadata($className);
        $customRepositoryClassName = $metadata->getCustomRepositoryClassName();

        if ($customRepositoryClassName !== null) {
            $repository = new $customRepositoryClassName($this, $this->unitOfWork, $metadata);
        } else {
            $repository = new ModelRepository($this, $this->unitOfWork, $metadata);
        }

        $this->repositories[$className] = $repository;

        return $repository;
    }
765420
protected function registerRepository()
    {
        $this->app->bindShared('migration.repository', function($app)
        {
            $table = $app['config']['database.migrations'];

            return new DatabaseMigrationRepository($app['db'], $table);
        });
    }
929337
public function registerCollectorClass($className)
    {
        /** @var CollectorInterface $collector */
        $collector = new $className($this->context->getProcess(), $this->datasource);
        $this->registerCollector($collector);
    }
381501
public function generateEntityRepositoryClass($fullClassName)
    {
        $variables = array(
            '<namespace>'       => $this->generateEntityRepositoryNamespace($fullClassName),
            '<repositoryName>'  => $this->generateEntityRepositoryName($fullClassName),
            '<className>'       => $this->generateClassName($fullClassName)
        );

        return str_replace(array_keys($variables), array_values($variables), self::$_template);
    }
1090127
protected function registerRepository()
    {
        $this->app->singleton('mapping.repository', function ($app) {
            $table = $app['config']['plastic.mappings'];

            return new Mappings($app['db'], $table);
        });
    }
1209160
protected function registerRepository()
	{
		$this->app->singleton('migration.orient.repository', function($app)
		{
			$table = $app['config']['database.migrations'];
                        $db = $app->make("ConnectionResolverInterface");

			return new DatabaseMigrationRepository($db, $table);
		});
	}
315392
public function addRepository(
        string $appName,
        string $indexName,
        TransformableRepository $repository
    ) {
        $this->repositories[$appName][$indexName] = $repository;
    }
1012383
protected function createRepository(EntityManagerInterface $entityManager, $entityName)
    {
        $metadata = $entityManager->getClassMetadata($entityName);
        $repository = $metadata->customRepositoryClassName;

        if ($repository === null) {
            $repository = $entityManager->getConfiguration()->getDefaultRepositoryClassName();
        }

        return $this->createResourceRepository(
            $repository,
            $entityManager,
            $metadata,
            $this->resolveResource($metadata->getName())
        );
    }
21905
public function getRepository($className)
    {
        if (!is_string($className)) {
            throw new \InvalidArgumentException(sprintf('Class name must be a string, "%s" given.',
                is_object($className) ? 'Object ' . get_class($className) : gettype($className)
            ));
        }

        return parent::getRepository($className);
    }