/** * Transform the found css to inline styles */ public function transformCssToInlineStyles($html) { // Clean-up html $this->cssInliner->setCleanup(true); // Set html $this->cssInliner->setHtml($html); // Use inline style blocks $this->cssInliner->setUseInlineStylesBlock(true); // Loop through all stylesheets foreach ($this->links as $link) { $css = file_get_contents($link); $this->cssInliner->setCSS($css); } return $this->cssInliner->convert(); }