TYPO3  7.6
Public Member Functions | Private Attributes | List of all members
OutputStyle Class Reference
Inheritance diagram for OutputStyle:
OutputInterface StyleInterface SymfonyStyle

Public Member Functions

 __construct (OutputInterface $output)
 
 newLine ($count=1)
 
 createProgressBar ($max=0)
 
 write ($messages, $newline=false, $type=self::OUTPUT_NORMAL)
 
 writeln ($messages, $type=self::OUTPUT_NORMAL)
 
 setVerbosity ($level)
 
 getVerbosity ()
 
 setDecorated ($decorated)
 
 isDecorated ()
 
 setFormatter (OutputFormatterInterface $formatter)
 
 getFormatter ()
 
- Public Member Functions inherited from StyleInterface
 title ($message)
 
 section ($message)
 
 listing (array $elements)
 
 text ($message)
 
 success ($message)
 
 error ($message)
 
 warning ($message)
 
 note ($message)
 
 caution ($message)
 
 table (array $headers, array $rows)
 
 ask ($question, $default=null, $validator=null)
 
 askHidden ($question, $validator=null)
 
 confirm ($question, $default=true)
 
 choice ($question, array $choices, $default=null)
 
 progressStart ($max=0)
 
 progressAdvance ($step=1)
 
 progressFinish ()
 

Private Attributes

 $output
 

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

Decorates output to add console style guide helpers.

Author
Kevin Bond kevin.nosp@m.bond.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition at line 23 of file OutputStyle.php.

Constructor & Destructor Documentation

__construct ( OutputInterface  $output)
Parameters
OutputInterface$output

Definition at line 30 of file OutputStyle.php.

References OutputStyle\$output.

Member Function Documentation

createProgressBar (   $max = 0)
Parameters
int$max
Returns
ProgressBar

Definition at line 48 of file OutputStyle.php.

getFormatter ( )

{Returns current output formatter instance.

Returns
OutputFormatterInterface
}

Implements OutputInterface.

Definition at line 112 of file OutputStyle.php.

Referenced by SymfonyStyle\block().

getVerbosity ( )

{Gets the current verbosity of the output.

Returns
int The current level of verbosity (one of the VERBOSITY constants)
}

Implements OutputInterface.

Definition at line 80 of file OutputStyle.php.

isDecorated ( )

{Gets the decorated flag.

Returns
bool true if the output will decorate messages, false otherwise
}

Implements OutputInterface.

Definition at line 96 of file OutputStyle.php.

Referenced by SymfonyStyle\block().

newLine (   $count = 1)

{Add newline(s).

Parameters
int$countThe number of newlines
}

Implements StyleInterface.

Definition at line 38 of file OutputStyle.php.

setDecorated (   $decorated)

{Sets the decorated flag.

Parameters
bool$decoratedWhether to decorate the messages
}

Implements OutputInterface.

Definition at line 88 of file OutputStyle.php.

setFormatter ( OutputFormatterInterface  $formatter)

{Sets output formatter.

Parameters
OutputFormatterInterface$formatter
}

Implements OutputInterface.

Definition at line 104 of file OutputStyle.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 72 of file OutputStyle.php.

write (   $messages,
  $newline = false,
  $type = self::OUTPUT_NORMAL 
)

{Writes a message to the output.

Parameters
string | array$messagesThe message as an array of lines or a single string
bool$newlineWhether to add a newline
int$typeThe type of output (one of the OUTPUT constants)
Exceptions
\InvalidArgumentExceptionWhen unknown output type is given
}

Implements OutputInterface.

Definition at line 56 of file OutputStyle.php.

writeln (   $messages,
  $type = self::OUTPUT_NORMAL 
)

{Writes a message to the output and adds a newline at the end.

Parameters
string | array$messagesThe message as an array of lines of a single string
int$typeThe type of output (one of the OUTPUT constants)
Exceptions
\InvalidArgumentExceptionWhen unknown output type is given
}

Implements OutputInterface.

Definition at line 64 of file OutputStyle.php.

Member Data Documentation

$output
private

Definition at line 25 of file OutputStyle.php.

Referenced by OutputStyle\__construct().