Skip to content

Converter injection #2

@MacDada

Description

@MacDada

I want to strip <style> tags: $converter->setStripOriginalStyleTags(true);

How about an optional constructor injection to give a possibility to use custom options?

/**
 * @param CssToInlineStyles $converter
 */
public function __construct(CssToInlineStyles $converter = null)
{
    if ($converter) {
        $this->converter = $converter;
    } else {
        $this->converter = new CssToInlineStyles();
        $this->converter->setUseInlineStylesBlock(TRUE);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions