PHP Class Webiny\Component\EventManager\Event

Each time an event is fired, an instance of Event class is passed to handlers. By extending this class you can implement your own event class and expand it with whatever functionality you might need.
Inheritance: implements ArrayAccess, implements IteratorAggregate, use trait Webiny\Component\StdLib\StdLibTrait
Afficher le fichier Open project: Webiny/Framework Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $eventData = null )
__get ( string $name ) : mixed Access internal data as if it was a real object
__isset ( string $name ) : boolean Override __isset
__set ( string $name, mixed $value ) : void Set internal data as if it was a real object
__unset ( string $name ) : void Override __unset
get ( string $name, mixed $default = null ) : mixed Get value or return $default if there is no element set.
getIterator ( ) : Traversable (PHP 5 >= 5.0.0)
Retrieve an external iterator
isPropagationStopped ( ) : boolean Check if propagation for this event is stopped
offsetExists ( mixed $offset ) : boolean (PHP 5 >= 5.0.0)
Whether a offset exists
offsetGet ( mixed $offset ) : mixed (PHP 5 >= 5.0.0)
Offset to retrieve
offsetSet ( mixed $offset, mixed $value ) : void (PHP 5 >= 5.0.0)
Offset to set
offsetUnset ( mixed $offset ) : void (PHP 5 >= 5.0.0)
Offset to unset
stopPropagation ( ) : void Stops the propagation of the event to further event listeners.
toArray ( ) : array Get event data in form of an array

Method Details

__construct() public méthode

public __construct ( $eventData = null )

__get() public méthode

Access internal data as if it was a real object
public __get ( string $name ) : mixed
$name string
Résultat mixed

__isset() public méthode

Override __isset
public __isset ( string $name ) : boolean
$name string
Résultat boolean

__set() public méthode

Set internal data as if it was a real object
public __set ( string $name, mixed $value ) : void
$name string
$value mixed
Résultat void

__unset() public méthode

Override __unset
public __unset ( string $name ) : void
$name string
Résultat void

get() public méthode

Get value or return $default if there is no element set.
public get ( string $name, mixed $default = null ) : mixed
$name string
$default mixed
Résultat mixed Config value or default value

getIterator() public méthode

(PHP 5 >= 5.0.0)
Retrieve an external iterator
public getIterator ( ) : Traversable
Résultat Traversable An instance of an object implementing Iterator or Traversable

isPropagationStopped() public méthode

Check if propagation for this event is stopped
public isPropagationStopped ( ) : boolean
Résultat boolean

offsetExists() public méthode

(PHP 5 >= 5.0.0)
Whether a offset exists
public offsetExists ( mixed $offset ) : boolean
$offset mixed

An offset to check for.

Résultat boolean true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

offsetGet() public méthode

(PHP 5 >= 5.0.0)
Offset to retrieve
public offsetGet ( mixed $offset ) : mixed
$offset mixed

The offset to retrieve.

Résultat mixed Can return all value types.

offsetSet() public méthode

(PHP 5 >= 5.0.0)
Offset to set
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed

The offset to assign the value to.

$value mixed

The value to set.

Résultat void

offsetUnset() public méthode

(PHP 5 >= 5.0.0)
Offset to unset
public offsetUnset ( mixed $offset ) : void
$offset mixed
Résultat void

stopPropagation() public méthode

After stopPropagation() is called, no other listeners will be processed.
public stopPropagation ( ) : void
Résultat void

toArray() public méthode

Get event data in form of an array
public toArray ( ) : array
Résultat array Event data array