forked from Athlon1600/php-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProxyEvent.php
More file actions
39 lines (29 loc) · 734 Bytes
/
ProxyEvent.php
File metadata and controls
39 lines (29 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace Proxy\Event;
class ProxyEvent implements \ArrayAccess {
private $data;
public function __construct($data = array()){
$this->data = $data;
}
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value){
if(is_null($offset)) {
$this->data[] = $value;
} else {
$this->data[$offset] = $value;
}
}
#[\ReturnTypeWillChange]
public function offsetExists($offset){
return isset($this->data[$offset]);
}
#[\ReturnTypeWillChange]
public function offsetUnset($offset){
unset($this->data[$offset]);
}
#[\ReturnTypeWillChange]
public function offsetGet($offset){
return isset($this->data[$offset]) ? $this->data[$offset] : null;
}
}
?>