Nextcloud PHP API (master)

GenericEvent extends Event
in package
implements ArrayAccess, IteratorAggregate

Class GenericEvent

convenience reimplementation of \Symfony\Component\GenericEvent against \OCP\EventDispatcher\Event

Tags
since
18.0.0
deprecated
22.0.0

use \OCP\EventDispatcher\Event

Table of Contents

Interfaces

ArrayAccess
IteratorAggregate

Properties

$arguments  : mixed
$subject  : mixed
$propagationStopped  : bool

Methods

__construct()  : mixed
Encapsulate an event with $subject and $args.
getArgument()  : mixed
Get argument by key.
getArguments()  : array<string|int, mixed>
Getter for all arguments.
getIterator()  : Traversable
Retrieve an external iterator
getSubject()  : mixed
Getter for subject property.
hasArgument()  : bool
Has argument.
isPropagationStopped()  : bool
{@inheritDoc}
offsetExists()  : bool
Whether a offset exists
offsetGet()  : mixed
Offset to retrieve
offsetSet()  : void
Offset to set
offsetUnset()  : void
Offset to unset
setArgument()  : GenericEvent
Add argument to event.
setArguments()  : GenericEvent
Set args property.
stopPropagation()  : void
Stops the propagation of the event to further event listeners

Properties

$arguments

protected mixed $arguments
Tags
deprecated
22.0.0

$subject

protected mixed $subject
Tags
deprecated
22.0.0

$propagationStopped

private bool $propagationStopped = false
Tags
since
22.0.0

Methods

__construct()

Encapsulate an event with $subject and $args.

public __construct([mixed $subject = null ][, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$subject : mixed = null
$arguments : array<string|int, mixed> = []
Tags
since
18.0.0
deprecated
22.0.0

getArgument()

Get argument by key.

public getArgument(string $key) : mixed
Parameters
$key : string
Tags
throws
InvalidArgumentException

if key is not found

since
18.0.0
deprecated
22.0.0

getArguments()

Getter for all arguments.

public getArguments() : array<string|int, mixed>
Tags
since
18.0.0
deprecated
22.0.0
Return values
array<string|int, mixed>

getSubject()

Getter for subject property.

public getSubject() : mixed
Tags
since
18.0.0
deprecated
22.0.0

hasArgument()

Has argument.

public hasArgument(mixed $key) : bool
Parameters
$key : mixed
Tags
since
18.0.0
deprecated
22.0.0
Return values
bool

isPropagationStopped()

{@inheritDoc}

public isPropagationStopped() : bool
Tags
since
22.0.0
see
StoppableEventInterface
Return values
bool

setArgument()

Add argument to event.

public setArgument(mixed $key, mixed $value) : GenericEvent
Parameters
$key : mixed
$value : mixed
Tags
since
18.0.0
deprecated
22.0.0
Return values
GenericEvent

setArguments()

Set args property.

public setArguments([array<string|int, mixed> $args = [] ]) : GenericEvent
Parameters
$args : array<string|int, mixed> = []
Tags
since
18.0.0
deprecated
22.0.0
Return values
GenericEvent

stopPropagation()

Stops the propagation of the event to further event listeners

public stopPropagation() : void
Tags
since
22.0.0

        
On this page

Search results