transformation_engine = $transformation_engine; } /** * Apply transformations to the provided DOM document. * * @param Document $document DOM document to apply the transformations to. * @param ErrorCollection $errors Collection of errors that are collected during transformation. * @return void */ public function optimizeDom( Document $document, ErrorCollection $errors ) { $this->transformation_engine->optimizeDom( $document, $errors ); } /** * Apply transformations to the provided string of HTML markup. * * @param string $html HTML markup to apply the transformations to. * @param ErrorCollection $errors Collection of errors that are collected during transformation. * @return string Optimized HTML string. */ public function optimizeHtml( $html, ErrorCollection $errors ) { return $this->transformation_engine->optimizeHtml( $html, $errors ); } }