![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/app/bundles/ReportBundle/Event/ |
<?php namespace Mautic\ReportBundle\Event; use Mautic\ReportBundle\Entity\Report; use Symfony\Contracts\EventDispatcher\Event; class AbstractReportEvent extends Event { protected ?string $context = null; /** * Report entity. * * @var Report */ protected $report; /** * @return Report */ public function getReport() { return $this->report; } public function getContext(): ?string { return $this->context; } /** * @return bool */ public function checkContext($context) { if (empty($this->context)) { return true; } if (is_array($context)) { $res = array_filter($context, fn ($elem) => 0 === stripos($this->context, (string) $elem)); return count($res) > 0; } elseif ($this->context == $context) { return true; } elseif (0 === stripos($this->context, (string) $context)) { return true; } else { return false; } } }