-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpudlObject.modern.php
52 lines (31 loc) · 1.4 KB
/
pudlObject.modern.php
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
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
trait pudlObject_trait {
////////////////////////////////////////////////////////////////////////////
// ARRAY ACCESS - WHETHER AN OFFSET EXISTS
// http://php.net/manual/en/arrayaccess.offsetexists.php
////////////////////////////////////////////////////////////////////////////
public function offsetExists($key, $isset=true) : bool {
return $this->_offsetExists($key, $isset);
}
////////////////////////////////////////////////////////////////////////////
// ARRAY ACCESS - ASSIGN A VALUE TO THE SPECIFIED OFFSET
// http://php.net/manual/en/arrayaccess.offsetset.php
////////////////////////////////////////////////////////////////////////////
public function offsetSet($key, $value) : void {
$this->_offsetSet($key, $value);
}
////////////////////////////////////////////////////////////////////////////
// ARRAY ACCESS - OFFSET TO RETRIEVE
// http://php.net/manual/en/arrayaccess.offsetget.php
////////////////////////////////////////////////////////////////////////////
public function &offsetGet($key) : mixed {
return $this->_offsetGet($key);
}
////////////////////////////////////////////////////////////////////////////
// ARRAY ACCESS - UNSET AN OFFSET
// http://php.net/manual/en/arrayaccess.offsetunset.php
////////////////////////////////////////////////////////////////////////////
public function offsetUnset($key) : void {
$this->_offsetUnset($key);
}
}