public trigger ( string $id, string $event, string | object $target = null, array | ArrayAccess $argv = [], null | callable $callback = null ) : Zend\EventManager\ResponseCollection | ||
$id | string | Identifier(s) for event emitting component(s) |
$event | string | Event |
$target | string | object | Object calling emit, or symbol describing target (such as static method name) |
$argv | array | ArrayAccess | Array of arguments; typically, should be associative |
$callback | null | callable | Callback function |
return | Zend\EventManager\ResponseCollection | All listener return values |
public function trigger($id, $event, $target = null, $argv = array(), $callback = null)
{
$e = $this->getEvent($id);
if (empty($e)) {
return false;
}
return $e->trigger($event, $target, $argv, $callback);
}