array = &$array; $this->key = $key; } /** * Returns the entry's current value or null if nothing is set. * * @return object */ function get() { if (isset($this->array[$this->key])) { return $this->array[$this->key]; } else { return null; } } /** * Set the array entry to the given value. * * @param object $value */ function set($value) { $this->array[$this->key] = $value; } /** * Clear the entry. */ function clear() { unset($this->array[$this->key]); } }