Example #1
0
 /**
  * Installs the folders required for the bootstrap project from repo to project folder.
  *
  * @param string $targetDirectory The directory where to put the files/folders.
  *
  * @author Benjamin Carl <*****@*****.**>
  * @return bool TRUE on success, otherwise FALSE
  * @access protected
  * @static
  */
 protected static function install($targetDirectory)
 {
     $notify = new \cli\notify\Spinner(\cli\Colors::colorize('%N%n%yInstalling ...%N%n'), 100);
     // Define source & destination
     $source = self::getSourcePath();
     $destination = $targetDirectory;
     // Iterate and copy ...
     foreach (self::getFolders() as $folder) {
         self::xcopy($source . $folder, $destination . $folder);
     }
     $notify->finish();
     return true;
 }
Example #2
0
 /**
  * Installs the folders required for the bootstrap project from repo to project folder.
  *
  * @param string $targetDirectory The directory where to put the files/folders.
  *
  * @author Benjamin Carl <*****@*****.**>
  *
  * @return bool TRUE on success, otherwise FALSE
  * @static
  */
 protected static function install($targetDirectory)
 {
     $notify = new \cli\notify\Spinner(\cli\Colors::colorize('%N%n%yInstalling bootstrap project ...%N%n'), 100);
     // Define source & destination
     $source = self::getSourcePath();
     $destination = $targetDirectory;
     // Iterate and copy ...
     foreach (self::getFolders() as $folder) {
         self::xcopy($source . $folder, $destination . $folder);
     }
     $target = realpath($destination . 'vendor/maximebf/debugbar/src/DebugBar/Resources');
     $link = realpath($destination . 'web') !== false ? realpath($destination . 'web') . DIRECTORY_SEPARATOR . 'assets' : false;
     if ($target !== false && $link !== false) {
         // Create important symlinks to required assets like for DebugBar
         $symlinked = symlink($target, $link);
     } else {
         $symlinked = false;
     }
     if ($symlinked === false) {
         self::showError('Could not create symlink from "' . $target . '" to "' . $link . '"');
     }
     $notify->finish();
     return true;
 }