Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : Emogrifier.php
<?php

namespace FluentBooking\App\Services\Libs\Emogrifier;


class Emogrifier
{
    private $html = '';

    private $disableInvisibleNode = false;

    public function __construct($html)
    {
        $this->html = (string) $html;
    }

    public function disableInvisibleNodeRemoval()
    {
        $this->disableInvisibleNode = true;
        return $this;
    }

    public function emogrify()
    {
        // check if php version is less than 8.1
        if (version_compare(phpversion(), '8.1', '<')) {
            return $this->handleLegacy();
        }

        if (!class_exists('\FluentEmogrifier\Vendor\Pelago\Emogrifier\CssInliner')) {
            require_once __DIR__ . '/scoped-vendor/autoload.php';
        }

        if (!class_exists('\FluentEmogrifier\Vendor\Pelago\Emogrifier\CssInliner')) {
            return $this->handleLegacy();
        }

        // check if css inlines is available or not
        return \FluentEmogrifier\Vendor\Pelago\Emogrifier\CssInliner::fromHtml($this->html)
            ->inlineCss()
            ->render();
    }

    private function handleLegacy()
    {
        $emogrifier = new EmogrifierPhp7($this->html);
        if ($this->disableInvisibleNode) {
            $emogrifier->disableInvisibleNodeRemoval();
        }

        return $emogrifier->emogrify();
    }

}
© 2026 GrazzMean-Shell