TYPO3  7.6
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ConsoleOutput Class Reference
Inheritance diagram for ConsoleOutput:
StreamOutput ConsoleOutputInterface Output OutputInterface OutputInterface

Public Member Functions

 __construct ($verbosity=self::VERBOSITY_NORMAL, $decorated=null, OutputFormatterInterface $formatter=null)
 
 setDecorated ($decorated)
 
 setFormatter (OutputFormatterInterface $formatter)
 
 setVerbosity ($level)
 
 getErrorOutput ()
 
 setErrorOutput (OutputInterface $error)
 
- Public Member Functions inherited from StreamOutput
 __construct ($stream, $verbosity=self::VERBOSITY_NORMAL, $decorated=null, OutputFormatterInterface $formatter=null)
 
 getStream ()
 
- Public Member Functions inherited from Output
 __construct ($verbosity=self::VERBOSITY_NORMAL, $decorated=false, OutputFormatterInterface $formatter=null)
 
 setFormatter (OutputFormatterInterface $formatter)
 
 getFormatter ()
 
 setDecorated ($decorated)
 
 isDecorated ()
 
 setVerbosity ($level)
 
 getVerbosity ()
 
 isQuiet ()
 
 isVerbose ()
 
 isVeryVerbose ()
 
 isDebug ()
 
 writeln ($messages, $type=self::OUTPUT_NORMAL)
 
 write ($messages, $newline=false, $type=self::OUTPUT_NORMAL)
 

Protected Member Functions

 hasStdoutSupport ()
 
 hasStderrSupport ()
 
- Protected Member Functions inherited from StreamOutput
 doWrite ($message, $newline)
 
 hasColorSupport ()
 
- Protected Member Functions inherited from Output
 doWrite ($message, $newline)
 

Private Member Functions

 isRunningOS400 ()
 
 openOutputStream ()
 
 openErrorStream ()
 

Private Attributes

 $stderr
 

Additional Inherited Members

- Public Attributes inherited from OutputInterface
const VERBOSITY_QUIET = 0
 
const VERBOSITY_NORMAL = 1
 
const VERBOSITY_VERBOSE = 2
 
const VERBOSITY_VERY_VERBOSE = 3
 
const VERBOSITY_DEBUG = 4
 
const OUTPUT_NORMAL = 0
 
const OUTPUT_RAW = 1
 
const OUTPUT_PLAIN = 2
 

Detailed Description

ConsoleOutput is the default class for all CLI output. It uses STDOUT.

This class is a convenient wrapper around StreamOutput.

$output = new ConsoleOutput();

This is equivalent to:

$output = new StreamOutput(fopen('php://stdout', 'w'));
Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 31 of file vendor/symfony/console/Output/ConsoleOutput.php.

Constructor & Destructor Documentation

__construct (   $verbosity = self::VERBOSITY_NORMAL,
  $decorated = null,
OutputFormatterInterface  $formatter = null 
)

Constructor.

Parameters
int$verbosityThe verbosity level (one of the VERBOSITY constants in OutputInterface)
bool | null$decoratedWhether to decorate messages (null for auto-guessing)
OutputFormatterInterface | null$formatterOutput formatter instance (null to use default OutputFormatter)

Definition at line 47 of file vendor/symfony/console/Output/ConsoleOutput.php.

References Output\$formatter, Output\$verbosity, Output\getFormatter(), ConsoleOutput\openErrorStream(), and ConsoleOutput\openOutputStream().

Member Function Documentation

getErrorOutput ( )

{Gets the OutputInterface for errors.

Returns
OutputInterface
}

Implements ConsoleOutputInterface.

Definition at line 84 of file vendor/symfony/console/Output/ConsoleOutput.php.

References ConsoleOutput\$stderr.

hasStderrSupport ( )
protected

Returns true if current environment supports writing console output to STDERR.

Returns
bool

Definition at line 114 of file vendor/symfony/console/Output/ConsoleOutput.php.

References ConsoleOutput\isRunningOS400().

Referenced by ConsoleOutput\openErrorStream().

hasStdoutSupport ( )
protected

Returns true if current environment supports writing console output to STDOUT.

Returns
bool

Definition at line 103 of file vendor/symfony/console/Output/ConsoleOutput.php.

References ConsoleOutput\isRunningOS400().

Referenced by ConsoleOutput\openOutputStream().

isRunningOS400 ( )
private

Checks if current executing environment is IBM iSeries (OS400), which doesn't properly convert character-encodings between ASCII to EBCDIC.

Returns
bool

Definition at line 125 of file vendor/symfony/console/Output/ConsoleOutput.php.

Referenced by ConsoleOutput\hasStderrSupport(), and ConsoleOutput\hasStdoutSupport().

openErrorStream ( )
private
Returns
resource

Definition at line 143 of file vendor/symfony/console/Output/ConsoleOutput.php.

References ConsoleOutput\hasStderrSupport().

Referenced by ConsoleOutput\__construct().

openOutputStream ( )
private
Returns
resource

Definition at line 133 of file vendor/symfony/console/Output/ConsoleOutput.php.

References ConsoleOutput\hasStdoutSupport().

Referenced by ConsoleOutput\__construct().

setDecorated (   $decorated)

{Sets the decorated flag.

Parameters
bool$decoratedWhether to decorate the messages
}

Implements OutputInterface.

Definition at line 57 of file vendor/symfony/console/Output/ConsoleOutput.php.

setErrorOutput ( OutputInterface  $error)

{Sets the OutputInterface used for errors.

Parameters
OutputInterface$error
}

Implements ConsoleOutputInterface.

Definition at line 92 of file vendor/symfony/console/Output/ConsoleOutput.php.

setFormatter ( OutputFormatterInterface  $formatter)

{Sets output formatter.

Parameters
OutputFormatterInterface$formatter
}

Implements OutputInterface.

Definition at line 66 of file vendor/symfony/console/Output/ConsoleOutput.php.

setVerbosity (   $level)

{Sets the verbosity of the output.

Parameters
int$levelThe level of verbosity (one of the VERBOSITY constants)
}

Implements OutputInterface.

Definition at line 75 of file vendor/symfony/console/Output/ConsoleOutput.php.

Member Data Documentation

$stderr
private