src/main/php/Arbit/VCSWrapper/CvsCli/Checkout.php
public function initialize($url, $user = null, $password = null)
    {
        $count = substr_count($url, '#');
        if ($count === 1) {
            $revision = null;
            list($repoUrl, $module) = explode('#', $url);
        } elseif ($count === 2) {
            list($repoUrl, $module, $revision) = explode('#', $url);
        } else {
            throw new \UnexpectedValueException("No valid VCS url $url");
        }

        $process = new \Arbit\VCSWrapper\CvsCli\Process();
        $process
            ->argument('-d')
            ->argument($repoUrl)
            ->argument('checkout')
            ->argument('-P')
            ->argument('-r')
            ->argument($revision)
            ->argument('-d')
            ->argument($this->root)
            ->argument($module)
            ->execute();
    }
public function initialize($url, $user = null, $password = null)
    {
        $count = substr_count($url, '#');
        if ($count === 1) {
            $revision = null;
            list($repoUrl, $module) = explode('#', $url);
        } elseif ($count === 2) {
            list($repoUrl, $module, $revision) = explode('#', $url);
        } else {
            throw new \UnexpectedValueException("No valid VCS url $url");
        }

        $process = new \Arbit\VCSWrapper\CvsCli\Process();
        $process
            ->argument('-d')
            ->argument($repoUrl)
            ->argument('checkout')
            ->argument('-P')
            ->argument('-r')
            ->argument($revision)
            ->argument('-d')
            ->argument($this->root)
            ->argument($module)
            ->execute();
    }
public function initialize ( $ url , $ user = null , $ password = null ) { $ count = substr_count ( $ url , '#' ) ; if ( $ count === 1 ) { $ revision = null ; list ( $ repoUrl , $ module ) = explode ( '#' , $ url ) ; } elseif ( $ count === 2 ) { list ( $ repoUrl , $ module , $ revision ) = explode ( '#' , $ url ) ; } else { throw new \ UnexpectedValueException ( "No valid VCS url $url" ) ; } $ process = new \ Arbit \ VCSWrapper \ CvsCli \ Process ( ) ; $ process -> argument ( '-d' ) -> argument ( $ repoUrl ) -> argument ( 'checkout' ) -> argument ( '-P' ) -> argument ( '-r' ) -> argument ( $ revision ) -> argument ( '-d' ) -> argument ( $ this -> root ) -> argument ( $ module ) -> execute ( ) ; }
Initializes fresh checkout

Initialize repository from the given URL. Optionally username and
password may be passed to the method, if required for the repository.

@param string $url
@param string $user
@param string $password
@return void
Initializes fresh checkout