Page MenuHomec4science

PhutilEvent.php
No OneTemporary

File Metadata

Created
Fri, Nov 22, 07:41

PhutilEvent.php

<?php
/**
* @group event
* @concrete-extensible
*/
class PhutilEvent {
private $type;
private $data;
private $stop = false;
public function __construct($type, array $data = array()) {
$this->type = $type;
$this->data = $data;
}
public function getType() {
return $this->type;
}
public function getValue($key, $default = null) {
return idx($this->data, $key, $default);
}
public function setValue($key, $value) {
$this->data[$key] = $value;
return $this;
}
public function stop() {
$this->stop = true;
return $this;
}
public function isStopped() {
return $this->stop;
}
}

Event Timeline