public function offsetGet($offset) { if (isset($this->{$offset}) and $this->{$offset} instanceof Tag) { if ($this->{$offset} instanceof \ArrayAccess) { return $this->{$offset}; } else { return $this->{$offset}->getValue(); } } return null; }