Overview

Namespaces

  • Evenement
  • None
  • Peridot
    • Console
    • Core
    • Reporter
    • Runner
    • Scope
    • Test
  • Symfony
    • Component
      • Console
        • Command
        • Descriptor
        • Event
        • Exception
        • Formatter
        • Helper
        • Input
        • Logger
        • Output
        • Question
        • Style
        • Tester
        • Tests
          • Command
          • Descriptor
          • Fixtures
          • Formatter
          • Helper
          • Input
          • Logger
          • Output
          • Style
          • Tester

Classes

  • OutputFormatter
  • OutputFormatterStyle
  • OutputFormatterStyleStack

Interfaces

  • OutputFormatterInterface
  • OutputFormatterStyleInterface
  • Overview
  • Namespace
  • Class

Class OutputFormatter

Formatter class for console output.

Symfony\Component\Console\Formatter\OutputFormatter implements Symfony\Component\Console\Formatter\OutputFormatterInterface
Namespace: Symfony\Component\Console\Formatter
Author: Konstantin Kudryashov ever.zet@gmail.com
Located at Formatter/OutputFormatter.php
Methods summary
public static string
# escape( string $text )

Escapes "<" special char in given text.

Escapes "<" special char in given text.

Parameters

$text
Text to escape

Returns

string
Escaped text
public
# __construct( boolean $decorated = false, array $styles = array() )

Initializes console output formatter.

Initializes console output formatter.

Parameters

$decorated
Whether this formatter should actually decorate strings
$styles
Array of "name => FormatterStyle" instances
public
# setDecorated( boolean $decorated )

Sets the decorated flag.

Sets the decorated flag.

Parameters

$decorated
Whether to decorate the messages or not

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterInterface::setDecorated()
public boolean
# isDecorated( )

Gets the decorated flag.

Gets the decorated flag.

Returns

boolean
true if the output will decorate messages, false otherwise

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterInterface::isDecorated()
public
# setStyle( string $name, Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $style )

Sets a new style.

Sets a new style.

Parameters

$name
The style name
$style
The style instance

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterInterface::setStyle()
public boolean
# hasStyle( string $name )

Checks if output formatter has style with specified name.

Checks if output formatter has style with specified name.

Parameters

$name

Returns

boolean

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterInterface::hasStyle()
public Symfony\Component\Console\Formatter\OutputFormatterStyleInterface
# getStyle( string $name )

Gets style options from style with specified name.

Gets style options from style with specified name.

Parameters

$name

Returns

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface

Throws

Symfony\Component\Console\Exception\InvalidArgumentException
When style isn't defined

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterInterface::getStyle()
public string
# format( string $message )

Formats a message according to the given styles.

Formats a message according to the given styles.

Parameters

$message
The message to style

Returns

string
The styled message

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterInterface::format()
public Symfony\Component\Console\Formatter\OutputFormatterStyleStack
# getStyleStack( )

Returns

Symfony\Component\Console\Formatter\OutputFormatterStyleStack
Peridot API documentation generated by ApiGen