protected function setCssContent($cssContent, $optionalFlags = null)
    {
        $attr = [];
        if (is_null($optionalFlags)) {
            $attr['media'] = 'all';
        } else {
            $knownAttributes = ['media'];
            foreach ($knownAttributes as $value) {
                if (array_key_exists($value, $optionalFlags)) {
                    $attr[$value] = $optionalFlags[$value];
                }
            }
        }
        return '<style type="text/css" media="' . $attr['media'] . '">'
            . $cssContent . '</style>';
    }