JOOMLA中国
  • Joomla中国首页
  • 社区
  • 教程
  • 应用市场
  • B计划
Joomla! Framework TM
  • Namespace
  • Class
  • Tree
  • Deprecated

Namespaces

  • Composer
    • Autoload
  • Joomla
    • Application
      • Cli
        • Output
          • Processor
      • Web
    • Data
    • DI
      • Exception
    • Event
    • Filter
    • Input
    • Ldap
    • Registry
      • Format
    • Session
      • Storage
    • String
    • Uri
    • Utilities
  • None
  • PasswordCompat
    • binary
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Yaml
        • Exception
    • Polyfill
      • Util

Classes

  • CliInput
  • CliOutput
  • ColorProcessor
  • ColorStyle

Class ColorStyle

Class ColorStyle

Final
Namespace: Joomla\Application\Cli
Since: 1.0
Located at vendor/joomla/application/src/Cli/ColorStyle.php

Methods summary

public
# __construct( string $fg = '', string $bg = '', array $options = array() )

Constructor

Constructor

Parameters

$fg
string - $fg Foreground color.
$bg
string - $bg Background color.
$options
array - $options Style options.

Throws

InvalidArgumentException

Since

1.0
public string
# __toString( )

Convert to a string.

Convert to a string.

Returns

string

Since

1.0
public static Joomla\Application\Cli\ColorStyle
# fromString( string $string )

Create a color style from a parameter string.

Create a color style from a parameter string.

Example: fg=red;bg=blue;options=bold,blink

Parameters

$string
string - $string The parameter string.

Returns

Joomla\Application\Cli\ColorStyle - Instance of $this to allow chaining.

Throws

RuntimeException

Since

1.0
public string
# getStyle( )

Get the translated color code.

Get the translated color code.

Returns

string

Since

1.0
public string
# getKnownColors( )

Get the known colors.

Get the known colors.

Returns

string

Since

1.0
public array
# getKnownOptions( )

Get the known options.

Get the known options.

Returns

array

Since

1.0

Magic methods summary

Joomla! Framework TM API documentation generated by ApiGen 2.8.0
Joomla!® and Joomla! Framework™ are trademarks of Open Source Matters, Inc. in the United States and other countries.