Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. IOInterface.php

function IOInterface::ask

Asks a question to the user.

Parameters

string $question The question to ask:

string|bool|int|float|null $default The default answer if none is given by the user:

Return value

mixed The user answer

Throws

\RuntimeException If there is no data to read in the input stream

2 methods override IOInterface::ask()
ConsoleIO::ask in vendor/composer/composer/src/Composer/IO/ConsoleIO.php
@inheritDoc
NullIO::ask in vendor/composer/composer/src/Composer/IO/NullIO.php
@inheritDoc

File

vendor/composer/composer/src/Composer/IO/IOInterface.php, line 143

Class

IOInterface
The Input/Output helper interface.

Namespace

Composer\IO

Code

public function ask(string $question, $default = null);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal