You are here

function hackedProject::download_remote_project in Hacked! 8.2

Downloads the remote project to be hashed later.

2 calls to hackedProject::download_remote_project()
hackedProject::file_get_location in src/hackedProject.php
hackedProject::hash_remote_project in src/hackedProject.php
Hashes the remote project downloaded earlier.

File

src/hackedProject.php, line 134

Class

hackedProject
Encapsulates a Hacked! project.

Namespace

Drupal\hacked

Code

function download_remote_project() {

  // Only do this once, no matter how many times we're called.
  if (!empty($this->remote_downloaded)) {
    return;
  }
  $this
    ->identify_project();
  $this->remote_downloaded = (bool) $this->remote_files_downloader
    ->download();

  // Logging.
  if (!$this->remote_downloaded) {
    $message = $this
      ->t('Could not download project: @title', array(
      '@title' => $this
        ->title(),
    ));
    \Drupal::logger('hacked')
      ->error($message
      ->render());
  }
}