version 1.1.1.1, 2012/02/21 23:48:06
|
version 1.1.1.2, 2012/05/29 12:34:34
|
Line 12 class ArrayReferenceProxy implements ArrayAccess
|
Line 12 class ArrayReferenceProxy implements ArrayAccess
|
|
|
function __construct(ArrayAccess $object, array &$element) |
function __construct(ArrayAccess $object, array &$element) |
{ |
{ |
echo __METHOD__ . "($element)\n"; | echo __METHOD__ . "(Array)\n"; |
$this->object = $object; |
$this->object = $object; |
$this->element = &$element; |
$this->element = &$element; |
} |
} |
Line 23 class ArrayReferenceProxy implements ArrayAccess
|
Line 23 class ArrayReferenceProxy implements ArrayAccess
|
} |
} |
|
|
function offsetGet($index) { |
function offsetGet($index) { |
echo __METHOD__ . "($this->element, $index)\n"; | echo __METHOD__ . "(Array, $index)\n"; |
return isset($this->element[$index]) ? $this->element[$index] : NULL; |
return isset($this->element[$index]) ? $this->element[$index] : NULL; |
} |
} |
|
|
function offsetSet($index, $value) { |
function offsetSet($index, $value) { |
echo __METHOD__ . "($this->element, $index, $value)\n"; | echo __METHOD__ . "(Array, $index, $value)\n"; |
$this->element[$index] = $value; |
$this->element[$index] = $value; |
} |
} |
|
|
function offsetUnset($index) { |
function offsetUnset($index) { |
echo __METHOD__ . "($this->element, $index)\n"; | echo __METHOD__ . "(Array, $index)\n"; |
unset($this->element[$index]); |
unset($this->element[$index]); |
} |
} |
} |
} |