src/Repository/RepositoryManager.php
public function addRepository($repository)
    {
        $class = $repository->getModelClass();
        if ($this->getByClass($class)) {
            throw new RepositoryException("The manager already contains a repository for the model class '$class'");
        }
        
        $repository->setManager($this);
        $this->repositories[$class] = $repository;
    }
public function addRepository($repository)
    {
        $class = $repository->getModelClass();
        if ($this->getByClass($class)) {
            throw new RepositoryException("The manager already contains a repository for the model class '$class'");
        }
        
        $repository->setManager($this);
        $this->repositories[$class] = $repository;
    }
public function addRepository ( $ repository ) { $ class = $ repository -> getModelClass ( ) ; if ( $ this -> getByClass ( $ class ) ) { throw new RepositoryException ( "The manager already contains a repository for the model class '$class'" ) ; } $ repository -> setManager ( $ this ) ; $ this -> repositories [ $ class ] = $ repository ; }
Register a repository with the manager.

@param ManagedRepository $repository     Manageable repository.

@throws RepositoryException              If the manager already contains a repository for the same model class.
Register a repository with the manager .