public static function cloneRepository($path, $url, array $args = array(), array $options = array())
    {
        $process = static::getProcess('clone', array_merge(array('-q'), $args, array($url, $path)), $options);

        $process->run();

        if (!$process->isSuccessFul()) {
            throw new RuntimeException(sprintf('Error while initializing repository: %s', $process->getErrorOutput()));
        }

        return new Repository($path, $options);
    }
public static function cloneRepository($path, $url, array $args = array(), array $options = array())
    {
        $process = static::getProcess('clone', array_merge(array('-q'), $args, array($url, $path)), $options);

        $process->run();

        if (!$process->isSuccessFul()) {
            throw new RuntimeException(sprintf('Error while initializing repository: %s', $process->getErrorOutput()));
        }

        return new Repository($path, $options);
    }
public static function cloneRepository ( $ path , $ url , array $ args = array ( ) , array $ options = array ( ) ) { $ process = static :: getProcess ( 'clone' , array_merge ( array ( '-q' ) , $ args , array ( $ url , $ path ) ) , $ options ) ; $ process -> run ( ) ; if ( ! $ process -> isSuccessFul ( ) ) { throw new RuntimeException ( sprintf ( 'Error while initializing repository: %s' , $ process -> getErrorOutput ( ) ) ) ; } return new Repository ( $ path , $ options ) ; }
Internal method to launch effective ``git clone`` command.

@param string $path    indicates where to clone repository
@param string $url     url of repository to clone
@param array  $args    arguments to be added to the command-line
@param array  $options options for Repository creation

@return Repository
Internal method to launch effective git clone command .