public function offsetGet($key) { $this->displayWarning(); if (is_object($this->object) && !$this->object instanceof \ArrayAccess) { return $this->object->{$key}; } else { return $this->object[$key]; } }