Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

EventManagerInterface.php

Zuletzt modifiziert: 02.04.2025, 15:02 - Dateigröße: 5.34 KiB


001  <?php
002  /**
003   * Zend Framework (http://framework.zend.com/)
004   *
005   * @link      http://github.com/zendframework/zend-eventmanager for the canonical source repository
006   * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
007   * @license   https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md
008   */
009   
010  namespace Zend\EventManager;
011   
012  /**
013   * Interface for messengers
014   */
015  interface EventManagerInterface extends SharedEventsCapableInterface
016  {
017      /**
018       * Create and trigger an event.
019       *
020       * Use this method when you do not want to create an EventInterface
021       * instance prior to triggering. You will be required to pass:
022       *
023       * - the event name
024       * - the event target (can be null)
025       * - any event parameters you want to provide (empty array by default)
026       *
027       * It will create the Event instance for you and then trigger all listeners
028       * related to the event.
029       *
030       * @param  string $eventName
031       * @param  null|object|string $target
032       * @param  array|object $argv
033       * @return ResponseCollection
034       */
035      public function trigger($eventName, $target = null, $argv = []);
036   
037      /**
038       * Create and trigger an event, applying a callback to each listener result.
039       *
040       * Use this method when you do not want to create an EventInterface
041       * instance prior to triggering. You will be required to pass:
042       *
043       * - the event name
044       * - the event target (can be null)
045       * - any event parameters you want to provide (empty array by default)
046       *
047       * It will create the Event instance for you, and trigger all listeners
048       * related to the event.
049       *
050       * The result of each listener is passed to $callback; if $callback returns
051       * a boolean true value, the manager must short-circuit listener execution.
052       *
053       * @param  callable $callback
054       * @param  string $eventName
055       * @param  null|object|string $target
056       * @param  array|object $argv
057       * @return ResponseCollection
058       */
059      public function triggerUntil(callable $callback, $eventName, $target = null, $argv = []);
060   
061      /**
062       * Trigger an event
063       *
064       * Provided an EventInterface instance, this method will trigger listeners
065       * based on the event name, raising an exception if the event name is missing.
066       *
067       * @param  EventInterface $event
068       * @return ResponseCollection
069       */
070      public function triggerEvent(EventInterface $event);
071   
072      /**
073       * Trigger an event, applying a callback to each listener result.
074       *
075       * Provided an EventInterface instance, this method will trigger listeners
076       * based on the event name, raising an exception if the event name is missing.
077       *
078       * The result of each listener is passed to $callback; if $callback returns
079       * a boolean true value, the manager must short-circuit listener execution.
080       *
081       * @param  callable $callback
082       * @param  EventInterface $event
083       * @return ResponseCollection
084       */
085      public function triggerEventUntil(callable $callback, EventInterface $event);
086   
087      /**
088       * Attach a listener to an event
089       *
090       * The first argument is the event, and the next argument is a
091       * callable that will respond to that event.
092       *
093       * The last argument indicates a priority at which the event should be
094       * executed; by default, this value is 1; however, you may set it for any
095       * integer value. Higher values have higher priority (i.e., execute first).
096       *
097       * You can specify "*" for the event name. In such cases, the listener will
098       * be triggered for every event *that has registered listeners at the time
099       * it is attached*. As such, register wildcard events last whenever possible!
100       *
101       * @param  string $eventName Event to which to listen.
102       * @param  callable $listener
103       * @param  int $priority Priority at which to register listener.
104       * @return callable
105       */
106      public function attach($eventName, callable $listener, $priority = 1);
107   
108      /**
109       * Detach a listener.
110       *
111       * If no $event or '*' is provided, detaches listener from all events;
112       * otherwise, detaches only from the named event.
113       *
114       * @param callable $listener
115       * @param null|string $eventName Event from which to detach; null and '*'
116       *     indicate all events.
117       * @return void
118       */
119      public function detach(callable $listener, $eventName = null);
120   
121      /**
122       * Clear all listeners for a given event
123       *
124       * @param  string $eventName
125       * @return void
126       */
127      public function clearListeners($eventName);
128   
129      /**
130       * Provide an event prototype to use with trigger().
131       *
132       * When `trigger()` needs to create an event instance, it should clone the
133       * prototype provided to this method.
134       *
135       * @param  EventInterface $prototype
136       * @return void
137       */
138      public function setEventPrototype(EventInterface $prototype);
139   
140      /**
141       * Get the identifier(s) for this EventManager
142       *
143       * @return array
144       */
145      public function getIdentifiers();
146   
147      /**
148       * Set the identifiers (overrides any currently set identifiers)
149       *
150       * @param  string[] $identifiers
151       * @return void
152       */
153      public function setIdentifiers(array $identifiers);
154   
155      /**
156       * Add identifier(s) (appends to any currently set identifiers)
157       *
158       * @param  string[] $identifiers
159       * @return void
160       */
161      public function addIdentifiers(array $identifiers);
162  }
163