コード例 #1
0
ファイル: modman.php プロジェクト: benevolk/modman-php
 /**
  * main method to create a clone of a git repo
  *
  * @param bool $bForce
  * @param bool $bCreateModman
  * @throws Exception
  */
 public function doClone($bForce = false, $bCreateModman = false)
 {
     $sCwd = getcwd();
     $sInitPath = realpath($sCwd);
     $oInit = new Modman_Command_Init();
     $oInit->doInit($sInitPath);
     if ($this->existsModuleFolder()) {
         if (!$bForce) {
             throw new Exception('Module already exists. Please use --force to overwrite existing folder');
         } else {
             $this->deleteModuleFolder($this->getModuleFolderPath());
         }
     }
     $this->executeClone();
     if (!$this->existsModmanFile() and $bCreateModman) {
         $this->doCreateModmanFile();
     }
     $oDeploy = new Modman_Command_Deploy($this->sFolderName);
     $oDeploy->doDeploy($bForce);
 }