You are here

Drush8Io.php in CMS Content Sync 8

Same filename and directory in other branches
  1. 2.1.x src/Cli/Drush8Io.php
  2. 2.0.x src/Cli/Drush8Io.php

File

src/Cli/Drush8Io.php
View source
<?php

namespace Drupal\cms_content_sync\Cli;

use Drush\Log\LogLevel;

/**
 * Class Drush8Io.
 *
 * This is a stand in for \Symfony\Component\Console\Style\StyleInterface with
 * drush 8 so that we don't need to depend on symfony components.
 */
class Drush8Io implements ICLIIO {

  /**
   * {@inheritdoc}
   */
  public function confirm($text, $default = true) {
    return drush_confirm($text);
  }

  /**
   * {@inheritdoc}
   */
  public function success($text) {
    drush_log($text, LogLevel::SUCCESS);
  }

  /**
   * {@inheritdoc}
   */
  public function warning($text) {
    drush_log($text, LogLevel::WARNING);
  }

  /**
   * {@inheritdoc}
   */
  public function error($text) {
    drush_log($text, LogLevel::ERROR);
  }

  /**
   * {@inheritdoc}
   */
  public function text($text) {
    drush_print($text);
  }

}

Classes

Namesort descending Description
Drush8Io Class Drush8Io.