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

Breadcrumb

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

function EventDispatcher::dispatchScript

Dispatch a script event.

Parameters

string $eventName The constant in ScriptEvents:

array<int, mixed> $additionalArgs Arguments passed by the user:

array<string, mixed> $flags Optional flags to pass data not as argument:

Return value

int return code of the executed script if any, for php scripts a false return value is changed to 1, anything else to 0

File

vendor/composer/composer/src/Composer/EventDispatcher/EventDispatcher.php, line 127

Class

EventDispatcher
The Event Dispatcher.

Namespace

Composer\EventDispatcher

Code

public function dispatchScript(string $eventName, bool $devMode = false, array $additionalArgs = [], array $flags = []) : int {
    assert($this->composer instanceof Composer, new \LogicException('This should only be reached with a fully loaded Composer'));
    return $this->doDispatch(new Script\Event($eventName, $this->composer, $this->io, $devMode, $additionalArgs, $flags));
}

API Navigation

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