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 OutputFormatterStyle

Formatter style class for defining styles.

Symfony\Component\Console\Formatter\OutputFormatterStyle implements Symfony\Component\Console\Formatter\OutputFormatterStyleInterface
Namespace: Symfony\Component\Console\Formatter
Author: Konstantin Kudryashov <ever.zet@gmail.com>
Api
Located at console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php
Methods summary
public
# __construct( string $foreground = null, string $background = null, array $options = array() )

Initializes output formatter style.

Initializes output formatter style.

Parameters

$foreground
string
$foreground The style foreground color name
$background
string
$background The style background color name
$options
array
$options The style options

Api

public
# setForeground( string $color = null )

Sets style foreground color.

Sets style foreground color.

Parameters

$color
string
$color The color name

Throws

InvalidArgumentException
When the color name isn't defined

Api

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface::setForeground()
public
# setBackground( string $color = null )

Sets style background color.

Sets style background color.

Parameters

$color
string
$color The color name

Throws

InvalidArgumentException
When the color name isn't defined

Api

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface::setBackground()
public
# setOption( string $option )

Sets some specific style option.

Sets some specific style option.

Parameters

$option
string
$option The option name

Throws

InvalidArgumentException
When the option name isn't defined

Api

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface::setOption()
public
# unsetOption( string $option )

Unsets some specific style option.

Unsets some specific style option.

Parameters

$option
string
$option The option name

Throws

InvalidArgumentException
When the option name isn't defined

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface::unsetOption()
public
# setOptions( array $options )

Sets multiple style options at once.

Sets multiple style options at once.

Parameters

$options
array
$options

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface::setOptions()
public string
# apply( string $text )

Applies the style to a given text.

Applies the style to a given text.

Parameters

$text
string
$text The text to style

Returns

string

Implementation of

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface::apply()
php-coveralls API documentation generated by ApiGen 2.8.0