Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • OutputFormatter
  • OutputFormatterStyle
  • OutputFormatterStyleStack

Interfaces

  • OutputFormatterInterface
  • OutputFormatterStyleInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

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>
Api
Located at console/Symfony/Component/Console/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
string
$text Text to escape

Returns

string
Escaped text
public
# __construct( Boolean $decorated = null, array $styles = array() )

Initializes console output formatter.

Initializes console output formatter.

Parameters

$decorated
Boolean
$decorated Whether this formatter should actually decorate strings
$styles
FormatterStyle[]
$styles Array of "name => FormatterStyle" instances

Api

public
# setDecorated( Boolean $decorated )

Sets the decorated flag.

Sets the decorated flag.

Parameters

$decorated
Boolean
$decorated Whether to decorate the messages or not

Api

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

Api

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
string
$name The style name
$style
Symfony\Component\Console\Formatter\OutputFormatterStyleInterface
$style The style instance

Api

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
string
$name

Returns

Boolean

Api

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
string
$name

Returns

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface

Throws

InvalidArgumentException
When style isn't defined

Api

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
string
$message The message to style

Returns

string
The styled message

Api

Implementation of

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

Returns

Symfony\Component\Console\Formatter\OutputFormatterStyleStack
Constants summary
string FORMAT_PATTERN '#(\\\\?)<(/?)([a-z][a-z0-9_=;-]+)?>((?: [^<\\\\]+ | (?!<(?:/?[a-z]|/>)). | .(?<=\\\\<) )*)#isx'
#

The pattern to phrase the format.

The pattern to phrase the format.

php-coveralls API documentation generated by ApiGen 2.8.0