UpdaterException example


  public static function factory($source$root) {
    if (is_dir($source)) {
      $updater = self::getUpdaterFromDirectory($source);
    }
    else {
      throw new UpdaterException('Unable to determine the type of the source directory.');
    }
    return new $updater($source$root);
  }

  /** * Determines which Updater class can operate on the given directory. * * @param string $directory * Extracted Drupal project. * * @return string * The class name which can work with this project type. * * @throws \Drupal\Core\Updater\UpdaterException */
Home | Imprint | This part of the site doesn't use cookies.