Skip to content
Snippets Groups Projects
Select Git revision
  • 4efaeaaff2c6d98a0efed00a0e3410f206998b2f
  • main default protected
  • register-logging-channel
  • expr-lang
  • ci-82
  • attr-events
  • locale-wip
  • custom-routes
  • v0.1.85
  • v0.1.84
  • v0.1.83
  • v0.1.82
  • v0.1.81
  • v0.1.80
  • v0.1.79
  • v0.1.78
  • v0.1.77
  • v0.1.76
  • v0.1.75
  • v0.1.74
  • v0.1.73
  • v0.1.72
  • v0.1.71
  • v0.1.70
  • v0.1.69
  • v0.1.68
  • v0.1.67
  • v0.1.65
28 results

ProxyDataEvent.php

  • ProxyDataEvent.php 1.01 KiB
    <?php
    
    declare(strict_types=1);
    
    namespace Dbp\Relay\CoreBundle\ProxyApi;
    
    use Symfony\Contracts\EventDispatcher\Event;
    
    class ProxyDataEvent extends Event
    {
        public const NAME = 'dbp.relay.proxy_bundle.proxy_data';
    
        /** @var ProxyDataInterface */
        private $proxyData;
    
        /** @var bool */
        private $wasHandled;
    
        public function __construct(ProxyDataInterface $proxyData)
        {
            $this->proxyData = $proxyData;
            $this->wasHandled = false;
        }
    
        public function getProxyData(): ProxyDataInterface
        {
            return $this->proxyData;
        }
    
        /**
         * Indicate, that the event was handled, e.g. there was an event subscriber for the requested proxy data namespace.
         */
        public function setHandled(): void
        {
            $this->wasHandled = true;
        }
    
        /**
         * True, if the event was handled, e.g. there was an event subscriber for the requested proxy data namespace, false otherwise.
         */
        public function wasHandled(): bool
        {
            return $this->wasHandled;
        }
    }