/**
* Creates the formatter.
*
* @param StyleSet $styleSet The style set to use.
*/
public function __construct(StyleSet $styleSet = null)
{
$this->innerFormatter = new OutputFormatter(false);
if (!$styleSet) {
$styleSet = new DefaultStyleSet();
}
foreach ($styleSet->toArray() as $tag => $style) {
$this->innerFormatter->setStyle($tag, StyleConverter::convert($style));
}
}