GenericEvent extends Event implements ArrayAccess, IteratorAggregate
Class GenericEvent
convenience reimplementation of \Symfony\Component\GenericEvent against \OCP\EventDispatcher\Event
Tags
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
$arguments
protected
mixed
$arguments
$subject
protected
mixed
$subject
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
Return values
mixed —getArgument()
Get argument by key.
public
getArgument(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —getArguments()
Getter for all arguments.
public
getArguments() : array
Tags
Return values
array —getIterator()
Retrieve an external iterator
public
getIterator() : Traversable
Tags
Return values
Traversable —getSubject()
Getter for subject property.
public
getSubject() : mixed
Tags
Return values
mixed —hasArgument()
Has argument.
public
hasArgument(mixed $key) : bool
Parameters
- $key : mixed
Tags
Return values
bool —offsetExists()
Whether a offset exists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Tags
Return values
bool —offsetGet()
Offset to retrieve
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Tags
Return values
mixed —offsetSet()
Offset to set
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
Tags
offsetUnset()
Offset to unset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
Tags
setArgument()
Add argument to event.
public
setArgument(mixed $key, mixed $value) : GenericEvent
Parameters
- $key : mixed
- $value : mixed
Tags
Return values
GenericEvent —setArguments()
Set args property.
public
setArguments([array $args = [] ]) : GenericEvent
Parameters
- $args : array = []