Skip to content

GenericEvent

Properties

name

The event name.

protected string $name

subject

The subject.

protected ?object $subject

arguments

Array of arguments.

protected array $arguments

Methods

__construct

public __construct(string $name = '', object|null $subject = null, array $arguments = []): mixed

Parameters:

Parameter Type Description
$name string
$subject object|null
$arguments array

getName

Gets the event name.

public getName(): string

setName

Sets the event name.

public setName(string $name): $this

Parameters:

Parameter Type Description
$name string

setSubject

Sets the subject.

public setSubject(object|null $subject): $this

Parameters:

Parameter Type Description
$subject object|null

getSubject

Gets the subject.

public getSubject(): null|object

setArgument

Sets a argument to the event.

public setArgument(string $name, mixed $value): $this

Parameters:

Parameter Type Description
$name string
$value mixed

getArgument

Gets the argument by its key.

public getArgument(string $name): mixed

Parameters:

Parameter Type Description
$name string

Throws:


setArguments

Sets array of arguments.

public setArguments(array $arguments): $this

Parameters:

Parameter Type Description
$arguments array

getArguments

Gets all arguments.

public getArguments(): array

hasArgument

Has argument.

public hasArgument(string $key): bool

Parameters:

Parameter Type Description
$key string

Inherited methods

isPropagationStopped

{@inheritdoc}

public isPropagationStopped(): bool

stopPropagation

Stops the propagation of the event to further event listeners.

public stopPropagation(): void


Automatically generated on 2025-10-13