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
Mostra file Open project: Webiny/Framework Class Usage Examples

Public Methods

Method 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 method

public __construct ( $eventData = null )

__get() public method

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

__isset() public method

Override __isset
public __isset ( string $name ) : boolean
$name string
return boolean

__set() public method

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

__unset() public method

Override __unset
public __unset ( string $name ) : void
$name string
return void

get() public method

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

getIterator() public method

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

isPropagationStopped() public method

Check if propagation for this event is stopped
public isPropagationStopped ( ) : boolean
return boolean

offsetExists() public method

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

An offset to check for.

return boolean true on success or false on failure.

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

offsetGet() public method

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

The offset to retrieve.

return mixed Can return all value types.

offsetSet() public method

(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.

return void

offsetUnset() public method

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

stopPropagation() public method

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

toArray() public method

Get event data in form of an array
public toArray ( ) : array
return array Event data array