Elgg  Version 3.0
Event.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
12 class Event implements
16 
17  const EVENT_TYPE = 'event';
18 
19  private $dic;
20  private $name;
21  private $type;
22  private $object;
23 
32  public function __construct(PublicContainer $dic, $name, $type, $object) {
33  $this->dic = $dic;
34  $this->name = $name;
35  $this->type = $type;
36  $this->object = $object;
37  }
38 
42  public function getName() {
43  return $this->name;
44  }
45 
49  public function getType() {
50  return $this->type;
51  }
52 
56  public function getObject() {
57  return $this->object;
58  }
59 
63  public function elgg() {
64  return $this->dic;
65  }
66 
70  public function toLegacyArgs() {
71  return [$this->name, $this->type, $this->object];
72  }
73 }
getType()
{Get the type of the event object.string}
Definition: Event.php:49
elgg()
{Get the DI container.PublicContainer}
Definition: Event.php:63
Models a user event passed to event handlers.
Definition: UserEvent.php:9
getName()
{Get the name of the event.string}
Definition: Event.php:42
getObject()
{Get the object of the event.mixed}
Definition: Event.php:56
The object passed to invokable class name handlers.
Definition: Event.php:12
__construct(PublicContainer $dic, $name, $type, $object)
Constructor.
Definition: Event.php:32
Models an event passed to event handlers.
Definition: Event.php:11
Models an object event passed to event handlers.
Definition: ObjectEvent.php:9
$site name