public function initialize()
    {
        preg_match('#^(?:(?:https?|git)://([^/]+)/|git@([^:]+):)([^/]+)/(.+?)(?:\.git|/)?$#', $this->url, $match);
        $this->owner = $match[3];
        $this->repository = $match[4];
        $this->originUrl = !empty($match[1]) ? $match[1] : $match[2];
        if ($this->originUrl === 'www.github.com') {
            $this->originUrl = 'github.com';
        }
        $this->cache = new Cache($this->io, $this->config->get('cache-repo-dir').'/'.$this->originUrl.'/'.$this->owner.'/'.$this->repository);

        if ( $this->config->get('use-github-api') === false || (isset($this->repoConfig['no-api']) && $this->repoConfig['no-api'] ) ){
            $this->setupGitDriver($this->url);

            return;
        }

        $this->fetchRootIdentifier();
    }
public function initialize()
    {
        preg_match('
        $this->owner = $match[3];
        $this->repository = $match[4];
        $this->originUrl = !empty($match[1]) ? $match[1] : $match[2];
        if ($this->originUrl === 'www.github.com') {
            $this->originUrl = 'github.com';
        }
        $this->cache = new Cache($this->io, $this->config->get('cache-repo-dir').'/'.$this->originUrl.'/'.$this->owner.'/'.$this->repository);

        if ( $this->config->get('use-github-api') === false || (isset($this->repoConfig['no-api']) && $this->repoConfig['no-api'] ) ){
            $this->setupGitDriver($this->url);

            return;
        }

        $this->fetchRootIdentifier();
    }
public function initialize ( ) { preg_match ( '#^(?:(?:https?|git)://([^/]+)/|git@([^:]+):)([^/]+)/(.+?)(?:\.git|/)?$#' , $ this -> url , $ match ) ; $ this -> owner = $ match [ 3 ] ; $ this -> repository = $ match [ 4 ] ; $ this -> originUrl = ! empty ( $ match [ 1 ] ) ? $ match [ 1 ] : $ match [ 2 ] ; if ( $ this -> originUrl === 'www.github.com' ) { $ this -> originUrl = 'github.com' ; } $ this -> cache = new Cache ( $ this -> io , $ this -> config -> get ( 'cache-repo-dir' ) . '/' . $ this -> originUrl . '/' . $ this -> owner . '/' . $ this -> repository ) ; if ( $ this -> config -> get ( 'use-github-api' ) === false || ( isset ( $ this -> repoConfig [ 'no-api' ] ) && $ this -> repoConfig [ 'no-api' ] ) ) { $ this -> setupGitDriver ( $ this -> url ) ; return ; } $ this -> fetchRootIdentifier ( ) ; }
{@inheritDoc}
{