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;
		}
	}