public function __construct()
{
// define our name, and our description
$this->setName('color');
$this->setShortDescription('set when to use color in the output');
$this->setLongDesc("Storyplayer can use color to make it easier to understand the output at a glance. " . "By default, Storyplayer will use color when stdout / stderr are connected to a terminal. " . "You can use this switch to override the default behaviour (for example, when piping the " . "output into less(1)." . PHP_EOL . PHP_EOL . "The default behaviour relies on PHP's posix_isatty() function. This should be built into " . "your copy of PHP, but your operating system may require you to install an additional " . "package to get it (grrr).");
// what are the long switches?
$this->addLongSwitch('color');
$this->addLongSwitch('colour');
// what is the required argument?
$this->setRequiredArg('<when>', "when to use colour; possible values are 'none', 'always' and 'auto'");
$this->setArgValidator(new Feature_ColorValidator());
$this->setArgHasDefaultValueOf('auto');
// all done
}