public function setRepository($repository)
    {
        if (!$this->_repository instanceof AnDomainRepositoryAbstract) {
            if (is_string($repository) && strpos($repository, '.') === false) {
                $identifier = clone $this->getIdentifier();
                $identifier->type = 'repos';
                $identifier->path = array();
                $identifier->name = $repository;
            } else {
                $identifier = $this->getIdentifier($repository);
            }

            $repository = $identifier;
        }

        $this->_repository = $repository;
    }
public function setRepository($repository)
    {
        if (!$this->_repository instanceof AnDomainRepositoryAbstract) {
            if (is_string($repository) && strpos($repository, '.') === false) {
                $identifier = clone $this->getIdentifier();
                $identifier->type = 'repos';
                $identifier->path = array();
                $identifier->name = $repository;
            } else {
                $identifier = $this->getIdentifier($repository);
            }

            $repository = $identifier;
        }

        $this->_repository = $repository;
    }
public function setRepository ( $ repository ) { if ( ! $ this -> _repository instanceof AnDomainRepositoryAbstract ) { if ( is_string ( $ repository ) && strpos ( $ repository , '.' ) === false ) { $ identifier = clone $ this -> getIdentifier ( ) ; $ identifier -> type = 'repos' ; $ identifier -> path = array ( ) ; $ identifier -> name = $ repository ; } else { $ identifier = $ this -> getIdentifier ( $ repository ) ; } $ repository = $ identifier ; } $ this -> _repository = $ repository ; }
Set the repository using identifier or a repository object.

@param mixed $repository
Set the repository using identifier or a repository object .