[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.191.171.72: ~ $
<?php

namespace MailPoet\Twig;

if (!defined('ABSPATH')) exit;


use MailPoet\Analytics\Analytics as AnalyticsGenerator;
use MailPoet\DI\ContainerWrapper;
use MailPoet\InvalidStateException;
use MailPoetVendor\Twig\Extension\AbstractExtension;
use MailPoetVendor\Twig\TwigFunction;

class Analytics extends AbstractExtension {
  public function getFunctions() {
    $analytics = ContainerWrapper::getInstance()->get(AnalyticsGenerator::class);
    if (!$analytics instanceof AnalyticsGenerator) {
      throw new InvalidStateException('AnalyticsGenerator service was not registered!');
    }
    return [
      new TwigFunction(
        'get_analytics_data',
        [$analytics, 'generateAnalytics'],
        ['is_safe' => ['all']]
      ),
      new TwigFunction(
        'is_analytics_enabled',
        [$analytics, 'isEnabled'],
        ['is_safe' => ['all']]
      ),
      new TwigFunction(
        'get_analytics_public_id',
        [$analytics, 'getPublicId'],
        ['is_safe' => ['all']]
      ),
      new TwigFunction(
        'is_analytics_public_id_new',
        [$analytics, 'isPublicIdNew'],
        ['is_safe' => ['all']]
      ),
    ];
  }
}

Filemanager

Name Type Size Permission Actions
Analytics.php File 1.14 KB 0644
Assets.php File 2.81 KB 0644
Filters.php File 487 B 0644
Functions.php File 7.52 KB 0644
Handlebars.php File 1.34 KB 0644
Helpscout.php File 556 B 0644
I18n.php File 2.86 KB 0644
index.php File 0 B 0644