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\EventDispatcherCode
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));
}