Open abuyoyo opened 4 years ago
Introduce compressor() method to HtmlCompressor interface. This will allow direct access to HtmlMin API.
compressor()
HtmlCompressor
HtmlMin
$parser = \WyriHaximus\HtmlCompress\Factory::construct(); $htmlMinInstance = $parser->compressor(); $htmlMinInstance->doRemoveHttpPrefixFromAttributes(); $htmlMinInstance->doMakeSameDomainsLinksRelative(['example.com']); $compressedHtml = $parser->compress($sourceHtml);
Introduce patterns() method to HtmlCompressor interface. Introduce add(PatternInterface $pattern) method to Patterns class. This will allow usage such as this:
patterns()
add(PatternInterface $pattern)
Patterns
$parser = \WyriHaximus\HtmlCompress\Factory::construct(); $patterns = $parser->patterns(); $patterns->add(CustomPatternThatImplementsPatternInterface); $compressedHtml = $parser->compress($sourceHtml);
Introduce
compressor()
method toHtmlCompressor
interface. This will allow direct access toHtmlMin
API.Introduce
patterns()
method toHtmlCompressor
interface. Introduceadd(PatternInterface $pattern)
method toPatterns
class. This will allow usage such as this: