Gets the repository used by the associated data object.

@return \Rhubarb\Stem\Repositories\Repository
423466
public function getRepository()
    {
        $emptyObject = SolutionSchema::getModel($this->modelClassName);

        $repository = $emptyObject->getRepository();

        return $repository;
    }
1311408
public function getRepository(string $name): Repository
    {
        if (!isset($this->repositories[$name])) {
            throw new \InvalidArgumentException(\sprintf(
                'The name %s is not a valid repository, try one of %s',
                $name,
                \implode(', ', \array_keys($this->repositories))
            ));
        }

        return $this->repositories[$name];
    }
206948
public function getModel()
    {
        $model = $this->getContainer('config')->get('rinvex.repository.models');

        return $this->model ?: str_replace(['Repositories', 'Repository'], [$model, ''], get_called_class());
    }
621050
public function getRepository()
    {
        if (null == $this->repository) {
            $this->setRepository(Orm::getRepository($this->type));
        }
        return $this->repository;
    }
934829
private function getRegistryRepository()
    {
        $repository = null;
        if (null !== $em = $this->_context->getApplication()->getEntityManager()) {
            $repository = $em->getRepository('BackBee\Bundle\Registry');
        }

        return $repository;
    }
480720
public function getRepository($name = null)
    {
        $doctrine = $this->getDoctrine();

        if ($name) {
            return $doctrine->getRepository($name);
        }

        return $doctrine->getRepository($this->getClass());
    }
801111
public function getRepository($type)
    {
        try {
            $ldapObjectSchema = $this->getLdapObjectSchema($type);
            $repositoryClass = $ldapObjectSchema->getRepository();
            if (!class_exists($repositoryClass)) {
                throw new \RuntimeException(sprintf('Repository class "%s" not found.', $repositoryClass));
            }
            $repository = new $repositoryClass($ldapObjectSchema, $this->getConnection());
            if (!($repository instanceof LdapObjectRepository)) {
                throw new \RuntimeException('Your repository class must extend \LdapTools\Object\LdapObjectRepository.');
            }
        } catch (\Exception $e) {
            throw new \RuntimeException(sprintf('Unable to load Repository for type "%s": %s', $type, $e->getMessage()));
        } catch (\Throwable $e) {
            throw new \RuntimeException(sprintf('Unable to load Repository for type "%s": %s', $type, $e->getMessage()));
        }

        return $repository;
    }
468580
public function getDataMapper()
    {
        $dataMapper = Ioc::make(DataMapper::class);
        $dataMapper->setSchema($this->getSchema());

        return $dataMapper;
    }
683640
public function getRepository()
    {
        if (!$this->started) {
            throw new LogicException('Puli was not started');
        }

        if (!$this->context instanceof ProjectContext) {
            return null;
        }

        if (!$this->repo) {
            $this->repo = $this->getFactory()->createRepository();
        }

        return $this->repo;
    }
82064
public function getRepository($itemClass)
    {
        if (!isset($this->repositories[$itemClass])) {
            $reflection                     = $this->getItemReflection($itemClass);
            $repoClass                      = $reflection->getRepositoryClass();
            $repo                           = new $repoClass(
                $reflection,
                $this
            );
            $this->repositories[$itemClass] = $repo;
        }
        else {
            $repo = $this->repositories[$itemClass];
        }
        
        return $repo;
    }
1207983
private function getUiTIDSavedSearchRepository()
    {
        $metadata = $this->metadata->serialize();
        $tokenCredentials = $metadata['uitid_token_credentials'];

        $savedSearchesService = $this->savedSearchesServiceFactory->withTokenCredentials($tokenCredentials);

        $repository = new UiTIDSavedSearchRepository($savedSearchesService);

        if ($this->logger) {
            $repository->setLogger($this->logger);
        }

        return $repository;
    }
1189536
public function getCurrentRepository()
    {
        $credentials = $this->getRepositoryCredentials();
        $credentials['repository'] = $this->getRepositoryEndpoint();
        $credentials['branch'] = $this->getRepositoryBranch();

        return new RepositoryKey($credentials);
    }
804425
public function getRepository()
    {
        if (!$this->_repository instanceof AnDomainRepositoryAbstract) {
            if (!$this->_repository instanceof AnServiceIdentifier) {
                $this->setRepository($this->_repository);
            }

            $this->_repository = $this->getService($this->_repository);
        }

        return $this->_repository;
    }
1364682
def get_repository(self, entity_cls):
        """"""
        entity_record = self._get_entity_by_class(entity_cls)
        provider = self.get_provider(entity_record.provider_name)

        return provider.get_repository(entity_record.entity_cls)
1083694
public function getRepository($className)
    {
        $repositoryClass = $className . "Repository";

        if (class_exists($repositoryClass)) {
            return new $repositoryClass($className, $this);
        }

        return new Repository($className, $this);
    }
357431
public function getEloquentRepository()
    {
        $repositoryGenerator = new RepositoryEloquentGenerator([
            'name' => $this->name,
        ]);

        $repository = $repositoryGenerator->getRootNamespace() . '\\' . $repositoryGenerator->getName();

        return str_replace([
            "\\",
            '/'
        ], '\\', $repository) . 'RepositoryEloquent';
    }
276393
protected function getRepositoryEndpoint()
    {
        // Get credentials
        $repository = $this->getRepositoryCredentials();
        $username = Arr::get($repository, 'username');
        $password = Arr::get($repository, 'password');
        $repository = Arr::get($repository, 'repository');

        // Add credentials if possible
        if ($username || $password) {
            // Encore parameters
            $username = urlencode($username);
            $password = urlencode($password);

            // Build credentials chain
            $credentials = $password ? $username.':'.$password : $username;
            $credentials .= '@';

            // Add them in chain
            $repository = preg_replace('#https://(.+)@#', 'https://', $repository);
            $repository = str_replace('https://', 'https://'.$credentials, $repository);
        }

        return $repository;
    }