Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EventsEmitter.php

function EventsEmitter::fire

Fires an event

Parameters

string $event Event name:

array $args Arguments to pass to functions attached to the: event

Return value

$this

File

vendor/mck89/peast/lib/Peast/Syntax/EventsEmitter.php, line 53

Class

EventsEmitter
Events emitter class. An instance of this class is used by Parser and Scanner to emit events and attach listeners to them

Namespace

Peast\Syntax

Code

public function fire($event, $args = array()) {
    if (isset($this->eventsRegistry[$event])) {
        foreach ($this->eventsRegistry[$event] as $listener) {
            call_user_func_array($listener, $args);
        }
    }
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal