Nextcloud PHP API (stable18)

GenericEvent extends Event implements ArrayAccess, IteratorAggregate

Class GenericEvent

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

Tags
since
18.0.0

Interfaces, Classes and Traits

ArrayAccess
IteratorAggregate

Table of Contents

$arguments  : mixed
$subject  : mixed
__construct()  : mixed
Encapsulate an event with $subject and $args.
getArgument()  : mixed
Get argument by key.
getArguments()  : array
Getter for all arguments.
getIterator()  : Traversable
Retrieve an external iterator
getSubject()  : mixed
Getter for subject property.
hasArgument()  : bool
Has argument.
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.

Properties

Methods

__construct()

Encapsulate an event with $subject and $args.

public __construct([mixed $subject = null ][, array $arguments = [] ]) : mixed

In Nextcloud 17.0.0 this event class used a now deprecated/removed Symfony base class that had a constructor (with default arguments). To lower the risk of a breaking change (PHP won't allow parent constructor calls if there is none), this empty constructor's only purpose is to hopefully not break existing sub- classes of this class.

Parameters
$subject : mixed = null
$arguments : array = []
Tags
since
18.0.0
Return values
mixed

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
Return values
mixed

getArguments()

Getter for all arguments.

public getArguments() : array
Tags
since
18.0.0
Return values
array

getSubject()

Getter for subject property.

public getSubject() : mixed
Tags
since
18.0.0
Return values
mixed

hasArgument()

Has argument.

public hasArgument(mixed $key) : bool
Parameters
$key : mixed
Tags
since
18.0.0
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
Return values
GenericEvent

Search results