Version: current

# Class SS_Cli

Class to facilitate command-line output. Support less-trivial output stuff such as colours (on xterm-color)

  Object
  SS_Cli

Package: sapphire\dev
Located at sapphire/dev/Cli.php

## Methods summary

`public static` | # `supports_colour( )` Returns true if the current STDOUT supports the use of colour control codes. Returns true if the current STDOUT supports the use of colour control codes.
`public static` | # `text( string $text, string $fgColour = null, string $bgColour = null, mixed $bold = false )` Return text encoded for CLI output, optionally coloured Return text encoded for CLI output, optionally coloured #### Parameters $text string $fgColour The foreground colour - black, red, green, yellow, blue, magenta, cyan, white. Null is default. $fgColour string $bgColour The foreground colour - black, red, green, yellow, blue, magenta, cyan, white. Null is default. $bgColour string $bold A boolean variable - bold or not. $bold
`public static` | # `start_colour( string $fgColour = null, string $bgColour = null, string $bold = false )` Send control codes for changing text to the given colour Send control codes for changing text to the given colour #### Parameters $fgColour string $fgColour The foreground colour - black, red, green, yellow, blue, magenta, cyan, white. Null is default. $bgColour string $bgColour The foreground colour - black, red, green, yellow, blue, magenta, cyan, white. Null is default. $bold string $bold A boolean variable - bold or not.
`public static` | # `end_colour( )` Send control codes for returning to normal colour Send control codes for returning to normal colour

### Methods inherited from Object

`__call()`, `__construct()`, `__toString()`, `__wakeup()`, `addMethodsFrom()`, `addStaticVars()`, `addWrapperMethod()`, `add_extension()`, `add_static_var()`, `allMethodNames()`, `cacheToFile()`, `cacheToFileWithArgs()`, `clearCache()`, `combined_static()`, `create()`, `createMethod()`, `create_from_string()`, `defineMethods()`, `exists()`, `extInstance()`, `extend()`, `getCustomClass()`, `getExtensionInstance()`, `getExtensionInstances()`, `get_extensions()`, `get_static()`, `hasExtension()`, `hasMethod()`, `has_extension()`, `invokeWithExtensions()`, `is_a()`, `loadCache()`, `parentClass()`, `parse_class_spec()`, `remove_extension()`, `sanitiseCachename()`, `saveCache()`, `set_stat()`, `set_static()`, `set_uninherited()`, `stat()`, `strong_create()`, `uninherited()`, `uninherited_static()`, `useCustomClass()`

### Magic methods summary

## Properties summary

### Properties inherited from Object

`$class`, `$extension_instances`, `$extensions`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -