public function offsetSet($key, $value)
	{
		$value = $value instanceof TreeNode ? $value : new TreeNode($value);

		if (is_null($key)) {
			$this->items[] = $value;
		} else {
			$this->items[$key] = $value;
		}
	}
public function offsetSet($key, $value)
	{
		$value = $value instanceof TreeNode ? $value : new TreeNode($value);

		if (is_null($key)) {
			$this->items[] = $value;
		} else {
			$this->items[$key] = $value;
		}
	}
public function offsetSet ( $ key , $ value ) { $ value = $ value instanceof TreeNode ? $ value : new TreeNode ( $ value ) ; if ( is_null ( $ key ) ) { $ this -> items [ ] = $ value ; } else { $ this -> items [ $ key ] = $ value ; } }
Set the item at a given offset.

@param  mixed  $key
@param  mixed  $value
@return void
Set the item at a given offset .