Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/updraftp.../vendor/symfony/event-di...
File: ImmutableEventDispatcher.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/*
[2] Fix | Delete
* This file is part of the Symfony package.
[3] Fix | Delete
*
[4] Fix | Delete
* (c) Fabien Potencier <fabien@symfony.com>
[5] Fix | Delete
*
[6] Fix | Delete
* For the full copyright and license information, please view the LICENSE
[7] Fix | Delete
* file that was distributed with this source code.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
namespace Symfony\Component\EventDispatcher;
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* A read-only proxy for an event dispatcher.
[14] Fix | Delete
*
[15] Fix | Delete
* @author Bernhard Schussek <bschussek@gmail.com>
[16] Fix | Delete
*/
[17] Fix | Delete
class ImmutableEventDispatcher implements EventDispatcherInterface
[18] Fix | Delete
{
[19] Fix | Delete
private $dispatcher;
[20] Fix | Delete
[21] Fix | Delete
public function __construct(EventDispatcherInterface $dispatcher)
[22] Fix | Delete
{
[23] Fix | Delete
$this->dispatcher = $dispatcher;
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
/**
[27] Fix | Delete
* {@inheritdoc}
[28] Fix | Delete
*/
[29] Fix | Delete
public function dispatch($eventName, Event $event = null)
[30] Fix | Delete
{
[31] Fix | Delete
return $this->dispatcher->dispatch($eventName, $event);
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* {@inheritdoc}
[36] Fix | Delete
*/
[37] Fix | Delete
public function addListener($eventName, $listener, $priority = 0)
[38] Fix | Delete
{
[39] Fix | Delete
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
/**
[43] Fix | Delete
* {@inheritdoc}
[44] Fix | Delete
*/
[45] Fix | Delete
public function addSubscriber(EventSubscriberInterface $subscriber)
[46] Fix | Delete
{
[47] Fix | Delete
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
/**
[51] Fix | Delete
* {@inheritdoc}
[52] Fix | Delete
*/
[53] Fix | Delete
public function removeListener($eventName, $listener)
[54] Fix | Delete
{
[55] Fix | Delete
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
/**
[59] Fix | Delete
* {@inheritdoc}
[60] Fix | Delete
*/
[61] Fix | Delete
public function removeSubscriber(EventSubscriberInterface $subscriber)
[62] Fix | Delete
{
[63] Fix | Delete
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
/**
[67] Fix | Delete
* {@inheritdoc}
[68] Fix | Delete
*/
[69] Fix | Delete
public function getListeners($eventName = null)
[70] Fix | Delete
{
[71] Fix | Delete
return $this->dispatcher->getListeners($eventName);
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
/**
[75] Fix | Delete
* {@inheritdoc}
[76] Fix | Delete
*/
[77] Fix | Delete
public function getListenerPriority($eventName, $listener)
[78] Fix | Delete
{
[79] Fix | Delete
return $this->dispatcher->getListenerPriority($eventName, $listener);
[80] Fix | Delete
}
[81] Fix | Delete
[82] Fix | Delete
/**
[83] Fix | Delete
* {@inheritdoc}
[84] Fix | Delete
*/
[85] Fix | Delete
public function hasListeners($eventName = null)
[86] Fix | Delete
{
[87] Fix | Delete
return $this->dispatcher->hasListeners($eventName);
[88] Fix | Delete
}
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function