2012-02-17 23:00:38 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of Composer.
|
|
|
|
*
|
|
|
|
* (c) Nils Adermann <naderman@naderman.de>
|
|
|
|
* Jordi Boggiano <j.boggiano@seld.be>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Composer\IO;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* IOInterface that is not interactive and never writes the output
|
|
|
|
*
|
|
|
|
* @author Christophe Coevoet <stof@notk.org>
|
|
|
|
*/
|
2013-08-18 13:32:34 +00:00
|
|
|
class NullIO extends BaseIO
|
2012-02-17 23:00:38 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function isInteractive()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-04-01 02:32:00 +00:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function isVerbose()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-04-26 21:23:35 +00:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function isVeryVerbose()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function isDebug()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-04-26 12:54:34 +00:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function isDecorated()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-02-17 23:00:38 +00:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
2016-01-28 13:41:19 +00:00
|
|
|
public function write($messages, $newline = true, $verbosity = self::NORMAL)
|
2012-02-17 23:00:38 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-02-06 12:52:44 +00:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
2016-01-28 13:41:19 +00:00
|
|
|
public function writeError($messages, $newline = true, $verbosity = self::NORMAL)
|
2015-02-06 12:52:44 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-02-17 23:00:38 +00:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
2016-01-28 13:41:19 +00:00
|
|
|
public function overwrite($messages, $newline = true, $size = 80, $verbosity = self::NORMAL)
|
2012-02-17 23:00:38 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-02-18 09:03:45 +00:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
2016-01-28 13:41:19 +00:00
|
|
|
public function overwriteError($messages, $newline = true, $size = 80, $verbosity = self::NORMAL)
|
2015-02-18 09:03:45 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-02-17 23:00:38 +00:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function ask($question, $default = null)
|
|
|
|
{
|
|
|
|
return $default;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function askConfirmation($question, $default = true)
|
|
|
|
{
|
|
|
|
return $default;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
2021-03-09 14:49:40 +00:00
|
|
|
public function askAndValidate($question, $validator, $attempts = null, $default = null)
|
2012-02-17 23:00:38 +00:00
|
|
|
{
|
|
|
|
return $default;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function askAndHideAnswer($question)
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
2014-08-12 09:12:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
2016-02-29 15:32:49 +00:00
|
|
|
public function select($question, $choices, $default, $attempts = false, $errorMessage = 'Value "%s" is invalid', $multiselect = false)
|
2014-08-12 09:12:07 +00:00
|
|
|
{
|
|
|
|
return $default;
|
|
|
|
}
|
2012-02-17 23:00:38 +00:00
|
|
|
}
|