Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • Symfony\Component\Yaml\Tests\A
  • Symfony\Component\Yaml\Tests\B
  • Symfony\Component\Yaml\Tests\DumperTest
  • Symfony\Component\Yaml\Tests\InlineTest
  • Symfony\Component\Yaml\Tests\ParseExceptionTest
  • Symfony\Component\Yaml\Tests\ParserTest
  • Symfony\Component\Yaml\Tests\YamlTest
  • Overview
  • Namespace
  • Function
  • Tree
 1: <?php
 2: 
 3: /*
 4:  * This file is part of the Symfony package.
 5:  *
 6:  * (c) Fabien Potencier <fabien@symfony.com>
 7:  *
 8:  * For the full copyright and license information, please view the LICENSE
 9:  * file that was distributed with this source code.
10:  */
11: 
12: namespace Symfony\Component\EventDispatcher;
13: 
14: /**
15:  * A read-only proxy for an event dispatcher.
16:  *
17:  * @author Bernhard Schussek <bschussek@gmail.com>
18:  */
19: class ImmutableEventDispatcher implements EventDispatcherInterface
20: {
21:     /**
22:      * The proxied dispatcher.
23:      *
24:      * @var EventDispatcherInterface
25:      */
26:     private $dispatcher;
27: 
28:     /**
29:      * Creates an unmodifiable proxy for an event dispatcher.
30:      *
31:      * @param EventDispatcherInterface $dispatcher The proxied event dispatcher.
32:      */
33:     public function __construct(EventDispatcherInterface $dispatcher)
34:     {
35:         $this->dispatcher = $dispatcher;
36:     }
37: 
38:     /**
39:      * {@inheritdoc}
40:      */
41:     public function dispatch($eventName, Event $event = null)
42:     {
43:         return $this->dispatcher->dispatch($eventName, $event);
44:     }
45: 
46:     /**
47:      * {@inheritdoc}
48:      */
49:     public function addListener($eventName, $listener, $priority = 0)
50:     {
51:         throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
52:     }
53: 
54:     /**
55:      * {@inheritdoc}
56:      */
57:     public function addSubscriber(EventSubscriberInterface $subscriber)
58:     {
59:         throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
60:     }
61: 
62:     /**
63:      * {@inheritdoc}
64:      */
65:     public function removeListener($eventName, $listener)
66:     {
67:         throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
68:     }
69: 
70:     /**
71:      * {@inheritdoc}
72:      */
73:     public function removeSubscriber(EventSubscriberInterface $subscriber)
74:     {
75:         throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
76:     }
77: 
78:     /**
79:      * {@inheritdoc}
80:      */
81:     public function getListeners($eventName = null)
82:     {
83:         return $this->dispatcher->getListeners($eventName);
84:     }
85: 
86:     /**
87:      * {@inheritdoc}
88:      */
89:     public function hasListeners($eventName = null)
90:     {
91:         return $this->dispatcher->hasListeners($eventName);
92:     }
93: }
94: 
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen